mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/storage. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D104217
This commit is contained in:
parent
8df74b1582
commit
8444825010
@ -632,8 +632,10 @@ BackgroundSessionStorageManager* BackgroundSessionStorageManager::GetOrCreate(
|
||||
}));
|
||||
}
|
||||
|
||||
return sManagers->LookupForAdd(aTopContextId).OrInsert([] {
|
||||
return new BackgroundSessionStorageManager();
|
||||
return sManagers->WithEntryHandle(aTopContextId, [](auto&& entry) {
|
||||
return entry
|
||||
.OrInsertWith([] { return new BackgroundSessionStorageManager(); })
|
||||
.get();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user