From 3ddd06679f1e666716391450adaa687db33332c7 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 5 Oct 2020 08:29:44 +0530 Subject: Resolve lock contention from lazy delegates (#1135) --- .../java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'autofill-parser') diff --git a/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt b/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt index d4d1c1af..f1cdb12a 100644 --- a/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt +++ b/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/PublicSuffixList.kt @@ -32,7 +32,7 @@ class PublicSuffixList( private val scope: CoroutineScope = CoroutineScope(dispatcher) ) { - private val data: PublicSuffixListData by lazy { PublicSuffixListLoader.load(context) } + private val data: PublicSuffixListData by lazy(LazyThreadSafetyMode.PUBLICATION) { PublicSuffixListLoader.load(context) } /** * Prefetch the public suffix list from disk so that it is available in memory. -- cgit v1.2.3