Bug 1388192 - Drop result principal URI from a cloned session history entry when opening view-source: page. r=bz
authorHonza Bambas <honzab.moz@firemni.cz>
Wed, 09 Aug 2017 11:50:00 -0400
changeset 373921 164240dd108df3cd7b3a3cb683511781c3577fbb
parent 373920 9a2e09bc461f1df68700ea0eee570516c1f8f234
child 373922 59c5bd42ea9c77acd3a734de4c1b897bf1137822
push id32311
push userkwierso@gmail.com
push dateFri, 11 Aug 2017 01:14:57 +0000
treeherdermozilla-central@253a8560dc34 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1388192
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1388192 - Drop result principal URI from a cloned session history entry when opening view-source: page. r=bz
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -5736,16 +5736,17 @@ nsDocShell::LoadPage(nsISupports* aPageD
     newSpec.Append(spec);
 
     rv = NS_NewURI(getter_AddRefs(newUri), newSpec);
     if (NS_FAILED(rv)) {
       return rv;
     }
     shEntry->SetURI(newUri);
     shEntry->SetOriginalURI(nullptr);
+    shEntry->SetResultPrincipalURI(nullptr);
     // shEntry's current triggering principal is whoever loaded that page initially.
     // But now we're doing another load of the page, via an API that is only exposed
     // to system code.  The triggering principal for this load should be the system
     // principal.
     shEntry->SetTriggeringPrincipal(nsContentUtils::GetSystemPrincipal());
   }
 
   rv = LoadHistoryEntry(shEntry, LOAD_HISTORY);