mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1929190 - QM: Initialize temporary origin even if a previous initialization attempt failed; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D228670
This commit is contained in:
parent
a6f73e6ce1
commit
5e21e285f9
@ -6126,6 +6126,13 @@ QuotaManager::EnsureTemporaryOriginIsInitializedInternal(
|
||||
// Don't need to traverse the directory, since it's empty.
|
||||
InitQuotaForOrigin(fullOriginMetadata, ClientUsageArray(),
|
||||
/* aUsageBytes */ 0);
|
||||
} else {
|
||||
QM_TRY_INSPECT(const auto& metadata,
|
||||
LoadFullOriginMetadataWithRestore(directory));
|
||||
|
||||
QM_TRY(MOZ_TO_RESULT(InitializeOrigin(metadata.mPersistenceType, metadata,
|
||||
metadata.mLastAccessTime,
|
||||
metadata.mPersisted, directory)));
|
||||
}
|
||||
|
||||
// TODO: If the metadata file exists and we didn't call
|
||||
@ -6136,6 +6143,8 @@ QuotaManager::EnsureTemporaryOriginIsInitializedInternal(
|
||||
// origin will be marked as "accessed", so
|
||||
// LoadFullOriginMetadataWithRestore will be called for the metadata
|
||||
// file in next session in LoadQuotaFromCache.
|
||||
// (If a previous origin initialization failed, we actually do call
|
||||
// LoadFullOriginMetadataWithRestore which updates the group)
|
||||
|
||||
return std::pair(std::move(directory), created);
|
||||
};
|
||||
|
@ -175,10 +175,5 @@ async function testCreateConnection() {
|
||||
/* exported testSteps */
|
||||
async function testSteps() {
|
||||
add_task(testCachedOrigins);
|
||||
add_task(
|
||||
{
|
||||
skip_if: () => true,
|
||||
},
|
||||
testCreateConnection
|
||||
);
|
||||
add_task(testCreateConnection);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user