2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/8803 - review: Add clarifying comments to onAppInit capture methods.

This commit is contained in:
Michael Comella 2020-04-15 11:14:53 -07:00 committed by Michael Comella
parent 12e7ad43c8
commit a4d569db34
2 changed files with 5 additions and 1 deletions

View File

@ -374,6 +374,8 @@ open class FenixApplication : LocaleAwareApplication() {
protected fun recordOnInit() {
// This gets called by more than one process. Ideally we'd only run this in the main process
// but the code to check which process we're in crashes because the Context isn't valid yet.
StartupTimeline.onApplicationInit()
//
// This method is not covered by our internal crash reporting: be very careful when modifying it.
StartupTimeline.onApplicationInit() // DO NOT MOVE ANYTHING ABOVE HERE: the timing is critical.
}
}

View File

@ -46,6 +46,8 @@ object StartupTimeline {
fun onApplicationInit() {
// This gets called from multiple processes: don't do anything expensive. See call site for details.
//
// This method also gets called multiple times if there are multiple Application implementations.
frameworkStartMeasurement.onApplicationInit()
}