mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1016875 - Part2: Ensure mDocument in ImportLoader::OnStopRequest. r=mrbkap
This commit is contained in:
parent
6fb3e2f23c
commit
302d5f0675
@ -292,6 +292,12 @@ ImportLoader::OnStopRequest(nsIRequest* aRequest,
|
||||
mParserStreamListener->OnStopRequest(aRequest, aContext, aStatus);
|
||||
}
|
||||
|
||||
if (!mDocument) {
|
||||
// If at this point we don't have a document, then the error was
|
||||
// already reported.
|
||||
return NS_ERROR_DOM_ABORT_ERR;
|
||||
}
|
||||
|
||||
nsCOMPtr<EventTarget> eventTarget = do_QueryInterface(mDocument);
|
||||
EventListenerManager* manager = eventTarget->GetOrCreateListenerManager();
|
||||
manager->AddEventListenerByType(this,
|
||||
|
Loading…
Reference in New Issue
Block a user