fixed race condition while upgrading containers and site assignments.
This commit is contained in:
parent
d7c0a3d9e1
commit
60bfdffdd6
3 changed files with 12 additions and 14 deletions
|
@ -112,8 +112,6 @@ const assignManager = {
|
||||||
return sites;
|
return sites;
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODOkmw: Change site assignment UUID
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Looks for abandoned site assignments. If there is no identity with
|
* Looks for abandoned site assignments. If there is no identity with
|
||||||
* the site assignment's userContextId (cookieStoreId), then the assignment
|
* the site assignment's userContextId (cookieStoreId), then the assignment
|
||||||
|
@ -133,15 +131,15 @@ const assignManager = {
|
||||||
await this.remove(configKey.replace(/^siteContainerMap@@_/, "https://"));
|
await this.remove(configKey.replace(/^siteContainerMap@@_/, "https://"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const updatedSideAssignment = macConfigs[configKey];
|
const updatedSiteAssignment = macConfigs[configKey];
|
||||||
if (!macConfigs[configKey].identityMacAddonUUID) {
|
updatedSiteAssignment.identityMacAddonUUID =
|
||||||
await this.set(
|
await identityState.lookupMACaddonUUID(match.cookieStoreId);
|
||||||
configKey.replace(/^siteContainerMap@@_/, "https://"),
|
await this.set(
|
||||||
updatedSideAssignment,
|
configKey,
|
||||||
false,
|
updatedSiteAssignment,
|
||||||
false
|
false,
|
||||||
);
|
false
|
||||||
}
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +166,7 @@ const assignManager = {
|
||||||
// We return here so the confirm page can load the tab when exempted
|
// We return here so the confirm page can load the tab when exempted
|
||||||
async _exemptTab(m) {
|
async _exemptTab(m) {
|
||||||
const pageUrl = m.pageUrl;
|
const pageUrl = m.pageUrl;
|
||||||
this.storageArea.setExempted(pageUrl, m.tabId);
|
await this.storageArea.setExempted(pageUrl, m.tabId);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ const identityState = {
|
||||||
);
|
);
|
||||||
if (cookieStoreId === "firefox-default") continue;
|
if (cookieStoreId === "firefox-default") continue;
|
||||||
if (!match) {
|
if (!match) {
|
||||||
this.remove(cookieStoreId);
|
await this.remove(cookieStoreId);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!macConfigs[configKey].macAddonUUID) {
|
if (!macConfigs[configKey].macAddonUUID) {
|
||||||
|
|
|
@ -148,7 +148,7 @@ const sync = {
|
||||||
},
|
},
|
||||||
|
|
||||||
async errorHandledRunSync () {
|
async errorHandledRunSync () {
|
||||||
sync.runSync().catch(async (error)=> {
|
await sync.runSync().catch( async (error)=> {
|
||||||
console.error("Error from runSync", error);
|
console.error("Error from runSync", error);
|
||||||
await sync.checkForListenersMaybeAdd();
|
await sync.checkForListenersMaybeAdd();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue