Open Bug 891634 Opened 6 years ago Updated 6 years ago

[meta] Use the appropriate context for global state versus UI operations

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

People

(Reporter: bnicholson, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: meta)

Activities are not guaranteed to stay alive for the lifetime of the application. Particularly, when Don't Keep Activities is enabled, GeckoApp is repeatedly created and destroyed. Our context getter in GeckoAppShell should not retain a reference to GeckoApp as this can lead to memory leaks and broken code relying on destroyed activities. Instead, we should keep a reference to the application context (which has the same lifetime of the application itself).
Fixing this bug will require removing all code that casts GeckoAppShell's context to GeckoApp (such as bug 891630).
This isn't just specific to GeckoAppShell, so updating accordingly.
Summary: Return the application context instead of the activity context in GeckoAppShell's context getter → Use the application context instead of the activity context wherever we have global state
Depends on: 851373
Depends on: 937945
Morphing this to a meta bug to track individual items.
Depends on: 945840, 949495
Keywords: meta
Summary: Use the application context instead of the activity context wherever we have global state → [meta] Use the appropriate context for global state versus UI operations
You need to log in before you can comment on or make changes to this bug.