summaryrefslogtreecommitdiff
path: root/toolkit/components
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
commitc55afb5c30a5c135a6fc83df846bbe660d387a9f (patch)
treed2111d099ffae989c2b7fb12a2891109cdaf1dd9 /toolkit/components
parent0b8174b2e38250f7acfd034531d1ee7506b25096 (diff)
downloaduxp-c55afb5c30a5c135a6fc83df846bbe660d387a9f.tar.gz
Bug 1341589 - Set triggeringPrincipal on history entry for view-source loads
Diffstat (limited to 'toolkit/components')
-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)