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:50:00 +0200
changeset 82043 39677d1cfacb9a596259f4578463c74941cdcbb7
parent 82042 3a05304b438ab852993d546276d198ec4e6acd52
child 82044 185e090a2616345cf0d6071dfbe718eeb5921232
push id306
push userbobbyholley@gmail.com
push dateTue, 23 Oct 2012 13:50:17 +0000
reviewersbz, akeybl
bugs801305
milestone10.0.10esrpre
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
@@ -276,17 +276,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);