mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
[BASILISK] Protect against nsIPrincipal.origin throwing for about:blank iframes and custom protocols
This commit is contained in:
parent
3230eb96fc
commit
074adbab24
1 changed files with 8 additions and 1 deletions
|
|
@ -74,7 +74,14 @@ var SessionStorageInternal = {
|
|||
|
||||
// Get the origin of the current history entry
|
||||
// and use that as a key for the per-principal storage data.
|
||||
let origin = principal.origin;
|
||||
let origin;
|
||||
try {
|
||||
// The origin getter may throw for about:blank iframes as of bug 1340710,
|
||||
// but we should ignore them anyway. The same goes for custom protocols.
|
||||
origin = principal.origin;
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
if (visitedOrigins.has(origin)) {
|
||||
// Don't read a host twice.
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue