mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1179069 - Remove docshell warnings in embedding. r=bz
This commit is contained in:
parent
38bbb6b028
commit
14347536a5
@ -76,11 +76,15 @@ using namespace mozilla::dom;
|
||||
static nsresult
|
||||
GetDOMEventTarget(nsWebBrowser* aInBrowser, EventTarget** aTarget)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aInBrowser);
|
||||
if (!aInBrowser) {
|
||||
return NS_ERROR_INVALID_POINTER;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> domWindow;
|
||||
aInBrowser->GetContentDOMWindow(getter_AddRefs(domWindow));
|
||||
NS_ENSURE_TRUE(domWindow, NS_ERROR_FAILURE);
|
||||
if (!domWindow) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> domWindowPrivate = do_QueryInterface(domWindow);
|
||||
NS_ENSURE_TRUE(domWindowPrivate, NS_ERROR_FAILURE);
|
||||
|
@ -360,7 +360,10 @@ nsWebBrowser::SetParentURIContentListener(
|
||||
NS_IMETHODIMP
|
||||
nsWebBrowser::GetContentDOMWindow(nsIDOMWindow** aResult)
|
||||
{
|
||||
NS_ENSURE_STATE(mDocShell);
|
||||
if (!mDocShell) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> retval = mDocShell->GetWindow();
|
||||
retval.forget(aResult);
|
||||
return *aResult ? NS_OK : NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user