Bug 467008. Pointing to a non-existent file:// binding URI leaks. r+sr=sicking

This commit is contained in:
Boris Zbarsky 2008-12-12 14:46:59 -05:00
parent 4203eb7bc0
commit eced8f9366

View File

@ -1260,7 +1260,16 @@ nsXBLService::FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoun
xblListener->AddRequest(req);
// Now kick off the async read.
channel->AsyncOpen(xblListener, nsnull);
rv = channel->AsyncOpen(xblListener, nsnull);
if (NS_FAILED(rv)) {
// Well, we won't be getting a load. Make sure to clean up our stuff!
target->RemoveEventListener(NS_LITERAL_STRING("load"),
static_cast<nsIDOMLoadListener*>(xblListener),
PR_FALSE);
if (bindingManager) {
bindingManager->RemoveLoadingDocListener(aDocumentURI);
}
}
return NS_OK;
}