Actually address the review comment too. Bug 324601.

This commit is contained in:
bzbarsky%mit.edu 2006-02-21 00:09:34 +00:00
parent c45f92a162
commit 383de920a1

View File

@ -1241,7 +1241,11 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
// is sane, I guess.
nsCOMPtr<nsIDocument> doc = GetDocumentFromScriptContext(mScriptContext);
nsIURI* uri = GetBaseURI();
privImpl->Init(uri, uri, doc->GetNodePrincipal());
nsIPrincipal* principal = nsnull;
if (doc) {
principal = doc->GetNodePrincipal();
}
privImpl->Init(uri, uri, principal);
}
// Create an empty document from it (resets current document as well)