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) {
|
async function waitFor(request) {
|
||||||
let {type, documentUrl, url, tabId, frameId} = request;
|
let {type, documentUrl, url, tabId, frameId} = request;
|
||||||
|
debug("deferWebTraffic probing",request);
|
||||||
if (tabId === browser.tabs.TAB_ID_NONE) return;
|
if (tabId === browser.tabs.TAB_ID_NONE) return;
|
||||||
if (!seenTabs.has(tabId)) {
|
if (!seenTabs.has(tabId)) {
|
||||||
if (type === "main_frame") {
|
if (type === "main_frame") {
|
||||||
|
|
|
@ -204,8 +204,7 @@
|
||||||
|
|
||||||
async fetchChildPolicy({url, contextUrl}, sender) {
|
async fetchChildPolicy({url, contextUrl}, sender) {
|
||||||
await ns.initializing;
|
await ns.initializing;
|
||||||
return (messageHandler.fetchChildPolicy =
|
return ns.computeChildPolicy(...arguments);
|
||||||
ns.computeChildPolicy)(...arguments);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async openStandalonePopup(tab) {
|
async openStandalonePopup(tab) {
|
||||||
|
@ -416,6 +415,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
async collectSeen(tabId) {
|
async collectSeen(tabId) {
|
||||||
|
await this.initializing;
|
||||||
try {
|
try {
|
||||||
let seen = Array.from(await Messages.send("collect", {uuid: ns.local.uuid}, {tabId, frameId: 0}));
|
let seen = Array.from(await Messages.send("collect", {uuid: ns.local.uuid}, {tabId, frameId: 0}));
|
||||||
debug("Collected seen", seen); // DEV_ONLY
|
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