mshtml: Get rid of no longer useful get_nsdoc_window helper.
diff --git a/dlls/mshtml/htmlframebase.c b/dlls/mshtml/htmlframebase.c
index 850d1a9..6c52e53 100644
--- a/dlls/mshtml/htmlframebase.c
+++ b/dlls/mshtml/htmlframebase.c
@@ -39,13 +39,14 @@
{
nsIDOMWindow *nswindow;
HTMLWindow *window;
+ nsresult nsres;
HRESULT hres = S_OK;
if(frame->content_window)
return S_OK;
- nswindow = get_nsdoc_window(nsdoc);
- if(!nswindow)
+ nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
+ if(NS_FAILED(nsres) || !nswindow)
return E_FAIL;
window = nswindow_to_window(nswindow);
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 17fe016..960a445 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -83,20 +83,6 @@
}
}
-nsIDOMWindow *get_nsdoc_window(nsIDOMDocument *nsdoc)
-{
- nsIDOMWindow *nswindow;
- nsresult nsres;
-
- nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
- if(NS_FAILED(nsres)) {
- ERR("GetDefaultView failed: %08x\n", nsres);
- return NULL;
- }
-
- return nswindow;
-}
-
static void release_children(HTMLWindow *This)
{
HTMLWindow *child;
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index eac02d9..9bb37e4 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -609,7 +609,6 @@
HRESULT HTMLWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLWindow*,HTMLWindow**) DECLSPEC_HIDDEN;
void update_window_doc(HTMLWindow*) DECLSPEC_HIDDEN;
HTMLWindow *nswindow_to_window(const nsIDOMWindow*) DECLSPEC_HIDDEN;
-nsIDOMWindow *get_nsdoc_window(nsIDOMDocument*) DECLSPEC_HIDDEN;
HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN;
HTMLImageElementFactory *HTMLImageElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN;
HRESULT HTMLLocation_Create(HTMLWindow*,HTMLLocation**) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/npplugin.c b/dlls/mshtml/npplugin.c
index 62f0d52..e22499b 100644
--- a/dlls/mshtml/npplugin.c
+++ b/dlls/mshtml/npplugin.c
@@ -126,9 +126,9 @@
if(NS_FAILED(nsres))
return NULL;
- nswindow = get_nsdoc_window(nsdoc);
+ nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
nsIDOMDocument_Release(nsdoc);
- if(!nswindow)
+ if(NS_FAILED(nsres) || !nswindow)
return NULL;
window = nswindow_to_window(nswindow);