diff options
author | JustOff <Off.Just.Off@gmail.com> | 2018-10-06 15:05:00 +0300 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2018-10-06 15:05:00 +0300 |
commit | 417db22f3eb8422fbdc67efd7b8baa3dac5b240e (patch) | |
tree | 3456f7085b0374574c3601c92d361f8166157c4c | |
parent | 39b8c639ba8d3c21dbfcd5c09c2bb9d74eb25e2c (diff) | |
download | uxp-417db22f3eb8422fbdc67efd7b8baa3dac5b240e.tar.gz |
[BASILISK] Protect against nsIPrincipal.origin throwing for about:blank iframes and custom protocols
-rw-r--r-- | application/basilisk/components/sessionstore/SessionStorage.jsm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/application/basilisk/components/sessionstore/SessionStorage.jsm b/application/basilisk/components/sessionstore/SessionStorage.jsm index 705139ebfd..7499f95e96 100644 --- a/application/basilisk/components/sessionstore/SessionStorage.jsm +++ b/application/basilisk/components/sessionstore/SessionStorage.jsm @@ -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; |