Update ChildPolicies when automatic temp TRUST for top-level document s is enabled.
This commit is contained in:
parent
4ce026a16c
commit
60c299c4f1
|
@ -364,7 +364,7 @@ var RequestGuard = (() => {
|
||||||
return ALLOW;
|
return ALLOW;
|
||||||
},
|
},
|
||||||
|
|
||||||
onHeadersReceived(request) {
|
async onHeadersReceived(request) {
|
||||||
// called for main_frame, sub_frame and object
|
// called for main_frame, sub_frame and object
|
||||||
|
|
||||||
// check for duplicate calls
|
// check for duplicate calls
|
||||||
|
@ -389,12 +389,12 @@ var RequestGuard = (() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ns.isEnforced(tabId)) {
|
if (ns.isEnforced(tabId)) {
|
||||||
let policy = ns.policy;
|
let policy = ns.policy;
|
||||||
let perms = policy.get(url, documentUrl).perms;
|
let perms = policy.get(url, documentUrl).perms;
|
||||||
if (policy.autoAllowTop && request.type === "main_frame" && perms === policy.DEFAULT) {
|
if (policy.autoAllowTop && request.type === "main_frame" && perms === policy.DEFAULT) {
|
||||||
policy.set(Sites.optimalKey(url), perms = policy.TRUSTED.tempTwin);
|
policy.set(Sites.optimalKey(url), perms = policy.TRUSTED.tempTwin);
|
||||||
|
await ChildPolicies.update(policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
let {capabilities} = perms;
|
let {capabilities} = perms;
|
||||||
|
|
Loading…
Reference in New Issue