mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 06:05:44 +00:00
68b1cebd29
Showing the tab history panel involves a gecko call to retrieve tab history. This can be slow, meaning we have no idea what state the app will be in when the tab history data is returned. Thus we need to protect the code that shows the tab history fragment against a number of scenarios to avoid crashes in those cases where the app might be shutting down: 1. If onSaveInstanceState() has been called (which might happen before or after onPause(), and might be linked to app shutdown - but the docs don't appear to give any guarantees), fragment transactions cannot be performed. We protect against this by accepting loss of state in fragment transactions. 2. If the Activity has been completely destroyed, trying to perform a fragment transaction will likewise fail. We protect against this by not even trying to perform the transaction if we definitively know that the Activity is being shut down (ie isFinishing()). In both of these cases, we simply must accept that we're potentially losing UI state: i.e. a user could request the tab history panel via long-back-press, followed by exiting the app; we now end up never ever showing the panel. This scenario doesn't seem like a major loss - and fixing this issue properly would require significant investment (i.e. we would need to either cache tab history on frontend side, or cache the tab-history panel request - and it's not clear users will still care about seeing the panel the next time they open firefox). MozReview-Commit-ID: JsAK1By8yqn --HG-- extra : rebase_source : 9a3b64d2829a969e4de2775c2714874aa8708031 |
||
---|---|---|
.. | ||
aidl/org/mozilla/gecko/media | ||
crashreporter/res | ||
java/org/mozilla/gecko | ||
locales | ||
resources | ||
adjust-sdk-sandbox.token | ||
AdjustConstants.java.in | ||
android-services.mozbuild | ||
AndroidManifest.xml.in | ||
AppConstants.java.in | ||
FennecManifest_permissions.xml.in | ||
GcmAndroidManifest_permissions.xml.in | ||
GcmAndroidManifest_services.xml.in | ||
geckoview.ddf | ||
generate_build_config.py | ||
Makefile.in | ||
moz.build | ||
package-name.txt.in | ||
strings.xml.in |