Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #8803 - review: Add clarifying comments to onAppInit capture meth…
Browse files Browse the repository at this point in the history
…ods.
  • Loading branch information
mcomella committed Apr 17, 2020
1 parent 2888d66 commit f3ed207
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/org/mozilla/fenix/FenixApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
}
2 changes: 2 additions & 0 deletions app/src/main/java/org/mozilla/fenix/perf/StartupTimeline.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit f3ed207

Please sign in to comment.