Fix XHR unit test

This commit is contained in:
Jonas Sicking 2008-10-14 15:26:09 -07:00
parent 21b9e9e8e4
commit f0100d3fdf

View File

@ -1425,7 +1425,7 @@ nsXMLHttpRequest::OpenRequest(const nsACString& method,
// Find the load group for the page, and add ourselves to it. This way any
// pending requests will be automatically aborted if the user leaves the page.
nsCOMPtr<nsILoadGroup> loadGroup;
if (!(mState & XML_HTTP_REQUEST_BACKGROUND)) {
if (doc && !(mState & XML_HTTP_REQUEST_BACKGROUND)) {
loadGroup = doc->GetDocumentLoadGroup();
}