Bug 1919507 - Cache: Allow completion of pending actions in Context::OnQuotaInit when the context was canceled; r=dom-storage-reviewers,asuth
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. Differential Revision: https://phabricator.services.mozilla.com/D220263
This commit is contained in:
5
dom/cache/Context.cpp
vendored
5
dom/cache/Context.cpp
vendored
@@ -912,7 +912,10 @@ void Context::CancelAll() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mState = STATE_CONTEXT_CANCELED;
|
mState = STATE_CONTEXT_CANCELED;
|
||||||
mPendingActions.Clear();
|
// Allow completion of pending actions in Context::OnQuotaInit
|
||||||
|
if (!mInitRunnable) {
|
||||||
|
mPendingActions.Clear();
|
||||||
|
}
|
||||||
for (const auto& activity : mActivityList.ForwardRange()) {
|
for (const auto& activity : mActivityList.ForwardRange()) {
|
||||||
activity->Cancel();
|
activity->Cancel();
|
||||||
}
|
}
|
||||||
|
|||||||
1
dom/cache/test/xpcshell/xpcshell.toml
vendored
1
dom/cache/test/xpcshell/xpcshell.toml
vendored
@@ -25,6 +25,5 @@ skip-if = ["true"]
|
|||||||
["test_schema_26_upgrade.js"]
|
["test_schema_26_upgrade.js"]
|
||||||
|
|
||||||
["test_slowDatabaseInitialization.js"]
|
["test_slowDatabaseInitialization.js"]
|
||||||
skip-if = ["true"]
|
|
||||||
|
|
||||||
["test_slowStorageInitialization.js"]
|
["test_slowStorageInitialization.js"]
|
||||||
|
|||||||
Reference in New Issue
Block a user