summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-30 23:08:16 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-30 23:08:16 +0200
commit05e44d895f595307d5fbcd0b2b5256cfdccb5ea3 (patch)
treed2111d099ffae989c2b7fb12a2891109cdaf1dd9 /toolkit
parent490883811099db289db93051c1bf419680498452 (diff)
downloaduxp-05e44d895f595307d5fbcd0b2b5256cfdccb5ea3.tar.gz
Bug 1341589 - Set triggeringPrincipal on history entry for view-source loads
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/viewsource/content/viewSource-content.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/toolkit/components/viewsource/content/viewSource-content.js b/toolkit/components/viewsource/content/viewSource-content.js
index fa1dd19f1a..70d23eaa46 100644
--- a/toolkit/components/viewsource/content/viewSource-content.js
+++ b/toolkit/components/viewsource/content/viewSource-content.js
@@ -330,6 +330,8 @@ var ViewSourceContent = {
.createInstance(Ci.nsISHEntry);
shEntry.setURI(BrowserUtils.makeURI(viewSrcURL, null, null));
shEntry.setTitle(viewSrcURL);
+ let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
+ shEntry.triggeringPrincipal = systemPrincipal;
shEntry.loadType = Ci.nsIDocShellLoadInfo.loadHistory;
shEntry.cacheKey = shEntrySource.cacheKey;
docShell.QueryInterface(Ci.nsIWebNavigation)