Fix for bug 298064 (nsContentUtils::GetDocumentFromCaller() is broken.). r=jst, sr=brendan.
git-svn-id: svn://10.0.0.236/trunk@179553 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1850,15 +1850,14 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
|
||||
// Grab a reference to the calling documents security info (if any)
|
||||
// and principal as it may be lost in the call to Reset().
|
||||
nsCOMPtr<nsISupports> securityInfo;
|
||||
nsCOMPtr<nsIPrincipal> callerPrincipal;
|
||||
|
||||
if (callerDoc) {
|
||||
securityInfo = callerDoc->GetSecurityInfo();
|
||||
|
||||
nsContentUtils::GetSecurityManager()->
|
||||
GetSubjectPrincipal(getter_AddRefs(callerPrincipal));
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrincipal> callerPrincipal;
|
||||
nsContentUtils::GetSecurityManager()->
|
||||
GetSubjectPrincipal(getter_AddRefs(callerPrincipal));
|
||||
|
||||
// The URI for the document after this call. Get it from the calling
|
||||
// principal (if available), or set it to "about:blank" if no
|
||||
// principal is reachable.
|
||||
|
||||
Reference in New Issue
Block a user