Closed Bug 1637680 Opened 1 year ago Closed 1 year ago

Some data is not persisted if the app is killed at the wrong time

Categories

(GeckoView :: Extensions, defect, P1)

Unspecified
All

Tracking

(firefox79 fixed)

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: agi, Assigned: agi)

References

Details

(Whiteboard: [geckoview:m78][geckoview:m79])

Attachments

(3 files)

Follow up from Bug 1634493.

Talked about this with :snorp, :mixedpuppy, :aswan.

We have a few cases of Gecko code using DeferredTask to persist data to disk at a later time which doesn't work on Android since there are no shutdown tasks. We could run some of them when receiving application-background.

Severity: -- → S3
Priority: -- → P1
Whiteboard: [geckoview:m78]
Whiteboard: [geckoview:m78] → [geckoview:m78][geckoview:m79]

Some tests rely on the order of execution of the blocklist code which cannot be
guaranteed if we don't wait for the enabled state to settle.

In particular, when calling _onUpdate in
AddonTestUtils.loadBlocklistRawData in 0 we implicitely assume that all the
actions deriving from updating the blocklist settle before the promise is
completed, this is not true for the enabled state.

Currently the test succedes because ExtensionPermissions.get is not actually
async in most cases, this is about to change in the next patch.

This is needed so that extensions can access incognito tabs during early
background script startup in tests.

Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/116a28847684
Make softDisable setter async. r=mixedpuppy
https://hg.mozilla.org/integration/autoland/rev/9528ab23db09
Use rkv in ExtensionPermissions. r=mixedpuppy,robwu
https://hg.mozilla.org/integration/autoland/rev/2e2818afa107
Register incognito permission early in tests. r=mixedpuppy
Regressions: 1644217
See Also: → 1625455
Depends on: rkv-safe-mode
Regressions: 1651628
Depends on: 1597898, 1604029, 1654192, 1594995, 1608721
No longer depends on: rkv-safe-mode
No longer depends on: 1604029, 1654192, 1594995, 1608721
You need to log in before you can comment on or make changes to this bug.