summaryrefslogtreecommitdiffstats
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
commit05e44d895f595307d5fbcd0b2b5256cfdccb5ea3 (patch)
treed2111d099ffae989c2b7fb12a2891109cdaf1dd9 /toolkit/components
parent490883811099db289db93051c1bf419680498452 (diff)
downloadUXP-05e44d895f595307d5fbcd0b2b5256cfdccb5ea3.tar
UXP-05e44d895f595307d5fbcd0b2b5256cfdccb5ea3.tar.gz
UXP-05e44d895f595307d5fbcd0b2b5256cfdccb5ea3.tar.lz
UXP-05e44d895f595307d5fbcd0b2b5256cfdccb5ea3.tar.xz
UXP-05e44d895f595307d5fbcd0b2b5256cfdccb5ea3.zip
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 fa1dd19f1..70d23eaa4 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)