Bug 546857 Part 7: Allow system-principal-XHR loaded documents to use XUL. r=jst a=blocker

This commit is contained in:
Jonas Sicking 2010-08-25 13:12:28 -07:00
parent fbcff92dc8
commit 47073deceb

View File

@ -2017,6 +2017,10 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
nsCOMPtr<nsIDocument> responseDoc = do_QueryInterface(mResponseXML);
responseDoc->SetPrincipal(documentPrincipal);
if (nsContentUtils::IsSystemPrincipal(mPrincipal)) {
responseDoc->ForceEnableXULXBL();
}
if (mState & XML_HTTP_REQUEST_USE_XSITE_AC) {
nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(mResponseXML);
if (htmlDoc) {