Make isTorBrowser information available in child policy.

This commit is contained in:
hackademix 2021-03-24 23:59:39 +01:00
parent 6ddba86e9a
commit cab286b316
1 changed files with 4 additions and 2 deletions

View File

@ -211,13 +211,15 @@
computeChildPolicy({url, contextUrl}, sender) { computeChildPolicy({url, contextUrl}, sender) {
let {tab, frameId} = sender; let {tab, frameId} = sender;
let policy = ns.policy; let policy = ns.policy;
let {isTorBrowser} = ns.local;
if (!policy) { if (!policy) {
console.log("Policy is null, initializing: %o, sending fallback.", ns.initializing); console.log("Policy is null, initializing: %o, sending fallback.", ns.initializing);
return { return {
permissions: new Permissions(Permissions.DEFAULT).dry(), permissions: new Permissions(Permissions.DEFAULT).dry(),
unrestricted: false, unrestricted: false,
cascaded: false, cascaded: false,
fallback: true fallback: true,
isTorBrowser,
}; };
} }
@ -250,7 +252,7 @@
unrestricted = true; unrestricted = true;
cascaded = false; cascaded = false;
} }
return {permissions, unrestricted, cascaded}; return {permissions, unrestricted, cascaded, isTorBrowser};
}, },
start() { start() {