Closed Bug 1919507 Opened 2 years ago Closed 2 years ago

Cache: Fix handling of directory locks invalidated during database initialization

Categories

(Core :: Storage: Cache API, defect, P2)

defect

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: janv, Assigned: janv)

References

Details

Attachments

(7 external files)

No description provided.

Cache implementation already handles directory locks invalidated during
database initialization, but test_slowDatabaseInitialization.js still hangs.
The issue is that Context::CancelAll currently just clears all pending actions
if the state is STATE_CONTEXT_INIT (the promise for caches.open is never
resolved or rejected). Instead of just clearing pending actions, the pending
actions need to be completed first when QuotaInitRunnable is done and only then
cleared.

Cache implementation already handles directory locks invalidated during
database initialization by canceling corresponding QuotaInitRunnable, this
patch adds an extra check for that to Context::OnQuotaInit.

Blocks: 1919550
See Also: → 1922203
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8e15948b2752 Set dom.caches.testing.enabled for all Cache xpcshell tests; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/3af0f575503a Cache: Add a new testing only notification for database work starting; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/df1b764f6b36 Cache: Add support for pausing QM IO thread after finishing database initialization; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/3b2d051a6800 Add a test for origin clearing requested right after starting database work for Cache; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/3b8a6c6adf65 Cache: Allow completion of pending actions in Context::OnQuotaInit when the context was canceled; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/96c1e2a9b5c4 Cache: Complete pending actions in Context::OnQuotaInit with correct error code when the context was canceled; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/6aa4ffc4e300 Cache: Add an extra check for invalidated directory locks to Context::OnQuotaInit; r=dom-storage-reviewers,asuth
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: