Commit 7bc2bc64 authored by Colin Lee's avatar Colin Lee Committed by Sebastian Kaspari
Browse files

For mozilla-mobile/fenix#2945: Dispatchers.default is a deadlock footgun

parent 15c3785f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ import kotlin.coroutines.CoroutineContext
class SearchEngineManager(
    private val providers: List<SearchEngineProvider> = listOf(
            AssetsSearchEngineProvider(LocaleSearchLocalizationProvider())),
    coroutineContext: CoroutineContext = Dispatchers.Default
    coroutineContext: CoroutineContext = Dispatchers.IO
) {
    private var deferredSearchEngines: Deferred<SearchEngineList>? = null
    private val scope = CoroutineScope(coroutineContext)
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@ permalink: /changelog/
* **feature-pwa**
  * Added preliminary support for pinning websites to the home screen.
  
* **browser-search**
  * Loading search engines should no longer deadlock on devices with 1-2 CPUs

# 2.0.0

* [Commits](https://github.com/mozilla-mobile/android-components/compare/v1.0.0...v2.0.0)
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ open class DefaultComponents(private val applicationContext: Context) {
    // Search
    val searchEngineManager by lazy {
        SearchEngineManager().apply {
            CoroutineScope(Dispatchers.Default).launch {
            CoroutineScope(Dispatchers.IO).launch {
                loadAsync(applicationContext).await()
            }
        }