Open Bug 1407316 Opened 2 years ago Updated 2 years ago
Explicitly maintain an internal Account shared state
Bug 1401318 clearly demonstrated that long-lived disparate representations of shared state will eventually become out-of-sync with the world (surprise!). In our case, the 'shared state' is the 'account' instance in AndroidFxAccount. Its many consumers have different life-cycles, and maintain this state for varying periods of times. It's also inevitable that the underlying 'account' object will become out-of-sync with the world, at which point we might fail in a variety of ways. Symptoms usually include failing to access data associated with the 'account' object - either via userData accessors (as in Bug 1349147), or via the internal Accounts APIs (as in https://bugzilla.mozilla.org/show_bug.cgi?id=1401318#c17). The many StrictMode warnings while accessing parts of the UI related to the accounts system are (likely) another manifestation of the current flow. While Bug 1401318 fixes some of the more pressing symptoms, it's a good idea to follow-up with a root-cause fix as well. One approach here might look like maintaining an 'account' representation in a shared singleton. This work involves modifications to AndroidFxAccount and other consumers (which should be mechanical and straight-forward) of the shared Account, and making sure we maintain our shared state up-to-date (which is likely to get tricky).
You need to log in before you can comment on or make changes to this bug.