Bug 1950564 - QM: Add a shutdown check to QuotaManager::EnsureTemporaryGroupIsInitializedInternal; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D240577
This commit is contained in:
@@ -5862,6 +5862,10 @@ Result<Ok, nsresult> QuotaManager::EnsureTemporaryGroupIsInitializedInternal(
|
||||
// origins. This is going to change soon with the planned asynchronous
|
||||
// temporary origin initialization done in the background.
|
||||
for (const auto& originMetadata : *array) {
|
||||
if (NS_WARN_IF(IsShuttingDown())) {
|
||||
return Err(NS_ERROR_ABORT);
|
||||
}
|
||||
|
||||
if (IsTemporaryOriginInitializedInternal(originMetadata)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ async function testShutdownDuringAllTemporaryOriginsInitialization() {
|
||||
// fail. However, we can determine if the initialization of all origins was
|
||||
// aborted due to shutdown by checking for the existence of origin metadata
|
||||
// files, which were artificially removed earlier.
|
||||
todo(
|
||||
Assert.ok(
|
||||
metadata1.exists() != metadata2.exists(),
|
||||
"Metadata for the second origin is not restored"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user