diff options
author | hackademix | 2019-10-18 22:46:01 +0200 |
---|---|---|
committer | hackademix | 2019-10-18 22:46:01 +0200 |
commit | 1b7690538c632bace1d97dc72320e85b44c9ed5a (patch) | |
tree | 2e3e42ed01b4eaf941d9bf23b1b141fe1f9c31ef /src/bg | |
parent | 1ead91d2aa0e9029327c3e0817d51f03777b31ae (diff) | |
download | noscript-1b7690538c632bace1d97dc72320e85b44c9ed5a.tar.gz noscript-1b7690538c632bace1d97dc72320e85b44c9ed5a.tar.xz noscript-1b7690538c632bace1d97dc72320e85b44c9ed5a.zip |
Policy fetching asynchronous only before initialization.
Diffstat (limited to 'src/bg')
-rw-r--r-- | src/bg/main.js | 5 |
1 files changed, 4 insertions, 1 deletions
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); |