Fixed race condition causing temporary settings not to survive updates sometimes.

This commit is contained in:
hackademix 2020-10-25 17:36:50 +01:00
parent 5c3b05ba07
commit 273a924324
1 changed files with 1 additions and 2 deletions

View File

@ -173,10 +173,9 @@ var LifeCycle = (() => {
throw new error("Ephemeral policy not found in survival tab %s!", tabId);
}
ns.unrestrictedTabs = new Set(unrestrictedTabs);
destroyIfNeeded();
if (ns.initializing) await ns.initializing;
ns.policy = new Policy(policy);
await ns.initializing;
await Promise.all(
Object.entries(allSeen).map(
async ([tabId, seen]) => {