Bug 801305 - Use the bonafide subject for the loadinfo owner. r=bz
authorBobby Holley <bobbyholley@gmail.com>
Fri, 19 Oct 2012 01:45:09 +0200
changeset 110856 0bdbca5347f553a74abf65e0c17d4f2120cb93f1
parent 110855 3739ede6cb9d5b0807c67e6311d6258f5bdbb1bb
child 110857 c5cf236799f7ff1bb3492f9119ffea804077f5d5
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersbz
bugs801305
milestone19.0a1
Bug 801305 - Use the bonafide subject for the loadinfo owner. r=bz
dom/base/nsLocation.cpp
--- a/dom/base/nsLocation.cpp
+++ b/dom/base/nsLocation.cpp
@@ -236,17 +236,17 @@ nsLocation::CheckURL(nsIURI* aURI, nsIDo
 
     if (urisEqual) {
       sourceURI = docCurrentURI;
     }
     else {
       sourceURI = principalURI;
     }
 
-    owner = do_QueryInterface(doc ? doc->NodePrincipal() : secMan->GetCxSubjectPrincipal(cx));
+    owner = do_QueryInterface(secMan->GetCxSubjectPrincipal(cx));
   }
 
   // Create load info
   nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
   docShell->CreateLoadInfo(getter_AddRefs(loadInfo));
   NS_ENSURE_TRUE(loadInfo, NS_ERROR_FAILURE);
 
   loadInfo->SetOwner(owner);