Open Bug 891634 Opened 7 years ago Updated 7 years ago
[meta] Use the appropriate context for global state versus UI operations
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
Morphing this to a meta bug to track individual items.
You need to log in before you can comment on or make changes to this bug.