Exclude chrome: as valid openers for popup candidates

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2227
This commit is contained in:
Raymond Hill 2025-04-22 09:34:26 -04:00
parent 9c523f0325
commit 59f4aca010
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -573,14 +573,12 @@ housekeep itself.
} catch {
return;
}
if (
Array.isArray(openerDetails) === false ||
openerDetails.length !== 2 ||
openerDetails[1] === null ||
openerDetails[1].url === 'about:newtab'
) {
return;
}
if ( Array.isArray(openerDetails) === false ) { return; }
if ( openerDetails.length !== 2 ) { return; }
if ( openerDetails[1] === null ) { return; }
if ( openerDetails[1].url === 'about:newtab' ) { return; }
// https://github.com/uBlockOrigin/uBlock-issues/issues/2227
if ( openerDetails[1].url.startsWith('chrome:') ) { return; }
popupCandidates.set(
tabId,
new PopupCandidate(createDetails, openerDetails)