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) {
let {tab, frameId} = sender;
let policy = ns.policy;
let {isTorBrowser} = ns.local;
if (!policy) {
console.log("Policy is null, initializing: %o, sending fallback.", ns.initializing);
return {
permissions: new Permissions(Permissions.DEFAULT).dry(),
unrestricted: false,
cascaded: false,
fallback: true
fallback: true,
isTorBrowser,
};
}
@ -250,7 +252,7 @@
unrestricted = true;
cascaded = false;
}
return {permissions, unrestricted, cascaded};
return {permissions, unrestricted, cascaded, isTorBrowser};
},
start() {