Bug 1333147 - Do not use owner as triggeringPrincipal when creating session history entry. r=bz a=gchang
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Fri, 10 Mar 2017 16:39:42 +0100
changeset 379107 501d26bbdbff0a584a1394f157d5064e14d0f448
parent 379106 063278f7c6ee1cd783ffab3897a59f0626c0f697
child 379108 bc67e63667ef0cb8f821a067d323aaa134a5ae81
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, gchang
bugs1333147
milestone53.0
Bug 1333147 - Do not use owner as triggeringPrincipal when creating session history entry. r=bz a=gchang
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -12313,21 +12313,16 @@ nsDocShell::AddToSessionHistory(nsIURI* 
       aChannel->GetLoadFlags(&loadFlags);
       loadReplace = loadFlags & nsIChannel::LOAD_REPLACE;
       httpChannel->GetReferrer(getter_AddRefs(referrerURI));
       httpChannel->GetReferrerPolicy(&referrerPolicy);
 
       discardLayoutState = ShouldDiscardLayoutState(httpChannel);
     }
 
-    // XXX Bug 1286838: Replace channel owner with loadInfo triggeringPrincipal
-    nsCOMPtr<nsISupports> owner;
-    aChannel->GetOwner(getter_AddRefs(owner));
-    triggeringPrincipal = do_QueryInterface(owner);
-
     nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
     if (loadInfo) {
       if (!triggeringPrincipal) {
         triggeringPrincipal = loadInfo->TriggeringPrincipal();
       }
 
       // For now keep storing just the principal in the SHEntry.
       if (!principalToInherit) {