diff options
author | Gaming4JC <g4jc@bulletmail.org> | 2018-10-08 22:08:44 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@bulletmail.org> | 2018-10-08 22:08:44 -0400 |
commit | 1de8c6bc02a7602c4b22320e2b77fa31ebd47b7a (patch) | |
tree | 1997312ac5f31161c35518dd3efa16ebf6aa4c6e | |
parent | db0a338e3357c68eacae29c4719f6032e87eda79 (diff) | |
download | iceweasel-uxp-1de8c6bc02a7602c4b22320e2b77fa31ebd47b7a.tar.gz |
backport: Protect against nsIPrincipal.origin throwing for about:blank iframes and custom protocol urls
-rw-r--r-- | components/sessionstore/SessionStorage.jsm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/components/sessionstore/SessionStorage.jsm b/components/sessionstore/SessionStorage.jsm index 705139e..7499f95 100644 --- a/components/sessionstore/SessionStorage.jsm +++ b/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; |