mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 764130 - Don't crash if NULL pointers are passed to nsIDOMRequestService methods. r=smaug
This commit is contained in:
parent
7c8b40b734
commit
ea21e1cad1
@ -181,6 +181,7 @@ NS_IMETHODIMP
|
||||
DOMRequestService::CreateRequest(nsIDOMWindow* aWindow,
|
||||
nsIDOMDOMRequest** aRequest)
|
||||
{
|
||||
NS_ENSURE_STATE(aWindow);
|
||||
NS_ADDREF(*aRequest = new DOMRequest(aWindow));
|
||||
|
||||
return NS_OK;
|
||||
@ -190,6 +191,7 @@ NS_IMETHODIMP
|
||||
DOMRequestService::FireSuccess(nsIDOMDOMRequest* aRequest,
|
||||
const jsval& aResult)
|
||||
{
|
||||
NS_ENSURE_STATE(aRequest);
|
||||
static_cast<DOMRequest*>(aRequest)->FireSuccess(aResult);
|
||||
|
||||
return NS_OK;
|
||||
@ -199,6 +201,7 @@ NS_IMETHODIMP
|
||||
DOMRequestService::FireError(nsIDOMDOMRequest* aRequest,
|
||||
const nsAString& aError)
|
||||
{
|
||||
NS_ENSURE_STATE(aRequest);
|
||||
static_cast<DOMRequest*>(aRequest)->FireError(aError);
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user