Bug 801305 - Use the bonafide subject principal for the loadinfo owner. r=bz a=akeybl
authorBobby Holley <bobbyholley@gmail.com>
Tue, 23 Oct 2012 15:49:02 +0200
changeset 109643 a00a19219da236bd1fd889d49ca5a8a4044d945a
parent 109642 cc904411ff4396e0c2914fb5fbfa50580a9ef40f
child 109644 f8a6138bcfba555673bfb906336e06caee65e559
push id1588
push userbobbyholley@gmail.com
push dateTue, 23 Oct 2012 13:49:19 +0000
treeherdermozilla-beta@a00a19219da2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, akeybl
bugs801305
milestone17.0
Bug 801305 - Use the bonafide subject principal for the loadinfo owner. r=bz a=akeybl
dom/base/nsLocation.cpp
--- a/dom/base/nsLocation.cpp
+++ b/dom/base/nsLocation.cpp
@@ -239,17 +239,17 @@ nsLocation::CheckURL(nsIURI* aURI, nsIDo
 
     if (urisEqual) {
       sourceURI = docCurrentURI;
     }
     else {
       sourceURI = principalURI;
     }
 
-    owner = do_QueryInterface(principal);
+    owner = do_QueryInterface(nsContentUtils::GetSubjectPrincipal());
   }
 
   // Create load info
   nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
   docShell->CreateLoadInfo(getter_AddRefs(loadInfo));
   NS_ENSURE_TRUE(loadInfo, NS_ERROR_FAILURE);
 
   loadInfo->SetOwner(owner);