Fixed computedChildPolicy() regression on missing tab url.

This commit is contained in:
hackademix 2024-10-22 00:34:55 +02:00
parent 482d4eb91d
commit 2018a5957a
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@
}, },
computeChildPolicy({url, contextUrl}, sender) { computeChildPolicy({url, contextUrl}, sender) {
const {tab, frameId} = sender; let {tab} = sender;
let policy = ns.policy; let policy = ns.policy;
const {isTorBrowser} = ns.local; const {isTorBrowser} = ns.local;
if (!policy) { if (!policy) {
@ -311,7 +311,7 @@
const tabId = tab ? tab.id : -1; const tabId = tab ? tab.id : -1;
let topUrl; let topUrl;
if (frameId === 0) { if (sender.frameId === 0) {
topUrl = url; topUrl = url;
} else if (tab) { } else if (tab) {
if (!tab.url) tab = TabCache.get(tabId); if (!tab.url) tab = TabCache.get(tabId);