Fix for bug 386656 (Security Error: Content at moz-nullprincipal:{8c0f4edc-0aac-45cc-8471-895f07bb1bb2} may not load or link to resource://gre/res/hiddenWindow.html during install of latest NTT Build). r/sr=jst.

This commit is contained in:
peterv@propagandism.org 2007-07-04 00:27:36 -07:00
parent b2190168cd
commit ee83281d9c

View File

@ -1518,6 +1518,12 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
if (doc) {
mPrincipal = doc->NodePrincipal();
}
else {
nsIScriptSecurityManager *secMan = nsContentUtils::GetSecurityManager();
if (secMan) {
secMan->GetSubjectPrincipal(getter_AddRefs(mPrincipal));
}
}
// Ignore argument if method is GET, there is no point in trying to
// upload anything