summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-10-08 22:08:44 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-10-08 22:08:44 -0400
commit1de8c6bc02a7602c4b22320e2b77fa31ebd47b7a (patch)
tree1997312ac5f31161c35518dd3efa16ebf6aa4c6e
parentdb0a338e3357c68eacae29c4719f6032e87eda79 (diff)
downloadiceweasel-uxp-1de8c6bc02a7602c4b22320e2b77fa31ebd47b7a.tar.gz
backport: Protect against nsIPrincipal.origin throwing for about:blank iframes and custom protocol urls
-rw-r--r--components/sessionstore/SessionStorage.jsm9
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;