mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] Close https://github.com/mozilla-mobile/fenix/issues/26320: Make Nimbus first-startup comments clear in FenixApplication
This commit is contained in:
parent
a9b865b019
commit
a47b4b3c74
@ -131,16 +131,9 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
||||
return
|
||||
}
|
||||
|
||||
// We can initialize Nimbus before Glean because Glean will queue messages
|
||||
// before it's initialized.
|
||||
initializeNimbus()
|
||||
|
||||
// We need to always initialize Glean and do it early here.
|
||||
initializeGlean()
|
||||
|
||||
// DO NOT ADD ANYTHING ABOVE HERE.
|
||||
setupInMainProcessOnly()
|
||||
|
||||
downloadWallpapers()
|
||||
// DO NOT ADD ANYTHING UNDER HERE.
|
||||
|
||||
// DO NOT MOVE ANYTHING BELOW THIS elapsedRealtimeNanos CALL.
|
||||
val stop = SystemClock.elapsedRealtimeNanos()
|
||||
@ -198,9 +191,20 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
||||
|
||||
@CallSuper
|
||||
open fun setupInMainProcessOnly() {
|
||||
// ⚠️ DO NOT ADD ANYTHING ABOVE THIS LINE.
|
||||
// Especially references to the engine/BrowserStore which can alter the app initialization.
|
||||
// See: https://github.com/mozilla-mobile/fenix/issues/26320
|
||||
//
|
||||
// We can initialize Nimbus before Glean because Glean will queue messages
|
||||
// before it's initialized.
|
||||
initializeNimbus()
|
||||
|
||||
ProfilerMarkerFactProcessor.create { components.core.engine.profiler }.register()
|
||||
|
||||
run {
|
||||
// We need to always initialize Glean and do it early here.
|
||||
initializeGlean()
|
||||
|
||||
// Attention: Do not invoke any code from a-s in this scope.
|
||||
val megazordSetup = finishSetupMegazord()
|
||||
|
||||
@ -246,6 +250,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
||||
initVisualCompletenessQueueAndQueueTasks()
|
||||
|
||||
ProcessLifecycleOwner.get().lifecycle.addObserver(TelemetryLifecycleObserver(components.core.store))
|
||||
|
||||
downloadWallpapers()
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class) // GlobalScope usage
|
||||
|
Loading…
Reference in New Issue
Block a user