summaryrefslogtreecommitdiff
path: root/src/bg
diff options
context:
space:
mode:
authorhackademix2019-10-18 22:46:01 +0200
committerhackademix2019-10-18 22:46:01 +0200
commit1b7690538c632bace1d97dc72320e85b44c9ed5a (patch)
tree2e3e42ed01b4eaf941d9bf23b1b141fe1f9c31ef /src/bg
parent1ead91d2aa0e9029327c3e0817d51f03777b31ae (diff)
downloadnoscript-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.js5
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);