2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[fenix] For bug 1807716: Move engine warmup above Glean initialization to fix crash at launch

This commit is contained in:
Zac McKenney 2022-12-30 10:16:48 -08:00 committed by mergify[bot]
parent 2c0ba52c89
commit c3250f583f

View File

@ -203,6 +203,11 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
ProfilerMarkerFactProcessor.create { components.core.engine.profiler }.register()
run {
// Make sure the engine is initialized and ready to use.
components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
components.core.engine.warmUp()
}
// We need to always initialize Glean and do it early here.
initializeGlean()
@ -213,10 +218,6 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
components.strictMode.enableStrictMode(true)
warmBrowsersCache()
// Make sure the engine is initialized and ready to use.
components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
components.core.engine.warmUp()
}
initializeWebExtensionSupport()
if (FeatureFlags.storageMaintenanceFeature) {
// Make sure to call this function before registering a storage worker