From 1b7690538c632bace1d97dc72320e85b44c9ed5a Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 18 Oct 2019 22:46:01 +0200 Subject: Policy fetching asynchronous only before initialization. --- src/bg/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/bg') diff --git a/src/bg/main.js b/src/bg/main.js index acc849d..8ddfbfd 100644 --- a/src/bg/main.js +++ b/src/bg/main.js @@ -141,8 +141,11 @@ }, async fetchChildPolicy({url, contextUrl}, sender) { - let {tab, frameId} = sender; await ns.initializing; + return (this.fetchChildPolicy = this.fetchChildPolicySync)(...arguments); + }, + fetchChildPolicySync({url, contextUrl}, sender) { + let {tab, frameId} = sender; let policy = ns.policy; if (!policy) { console.log("Policy is null, initializing: %o, sending fallback.", ns.initializing); -- cgit v1.2.3