Bug 1341589 - Set triggeringPrincipal on history entry for view-source loads

This commit is contained in:
janekptacijarabaci 2018-04-30 23:08:16 +02:00 committed by Roy Tam
commit 582f93fe09

View file

@ -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)