Mitigate race conditions on startup.
This commit is contained in:
parent
2947793037
commit
33d2ce0c1d
|
@ -46,6 +46,7 @@ function deferWebTraffic(promiseToWaitFor, next) {
|
|||
|
||||
async function waitFor(request) {
|
||||
let {type, documentUrl, url, tabId, frameId} = request;
|
||||
debug("deferWebTraffic probing",request);
|
||||
if (tabId === browser.tabs.TAB_ID_NONE) return;
|
||||
if (!seenTabs.has(tabId)) {
|
||||
if (type === "main_frame") {
|
||||
|
|
|
@ -204,8 +204,7 @@
|
|||
|
||||
async fetchChildPolicy({url, contextUrl}, sender) {
|
||||
await ns.initializing;
|
||||
return (messageHandler.fetchChildPolicy =
|
||||
ns.computeChildPolicy)(...arguments);
|
||||
return ns.computeChildPolicy(...arguments);
|
||||
},
|
||||
|
||||
async openStandalonePopup(tab) {
|
||||
|
@ -416,6 +415,7 @@
|
|||
},
|
||||
|
||||
async collectSeen(tabId) {
|
||||
await this.initializing;
|
||||
try {
|
||||
let seen = Array.from(await Messages.send("collect", {uuid: ns.local.uuid}, {tabId, frameId: 0}));
|
||||
debug("Collected seen", seen); // DEV_ONLY
|
||||
|
|
2
src/nscl
2
src/nscl
|
@ -1 +1 @@
|
|||
Subproject commit 593c414c9ae7ede326109d5af10e6ff21c4a1138
|
||||
Subproject commit 1a94f457568d2708e5e61c6322bfa4f1e50a20ec
|
Loading…
Reference in New Issue