summaryrefslogtreecommitdiffstats
path: root/toolkit/components/reader
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/reader')
-rw-r--r--toolkit/components/reader/ReaderMode.jsm13
1 files changed, 12 insertions, 1 deletions
diff --git a/toolkit/components/reader/ReaderMode.jsm b/toolkit/components/reader/ReaderMode.jsm
index e9eb83154..6641e7387 100644
--- a/toolkit/components/reader/ReaderMode.jsm
+++ b/toolkit/components/reader/ReaderMode.jsm
@@ -119,7 +119,18 @@ this.ReaderMode = {
}
}
- win.document.location = originalURL;
+ let referrerURI, principal;
+ try {
+ referrerURI = Services.io.newURI(url);
+ principal = Services.scriptSecurityManager.createCodebasePrincipal(
+ referrerURI, win.document.nodePrincipal.originAttributes);
+ } catch (e) {
+ Cu.reportError(e);
+ return;
+ }
+ let flags = webNav.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL |
+ webNav.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
+ webNav.loadURI(originalURL, flags, referrerURI, null, null, principal);
},
/**