Module: wine Branch: master Commit: 5e8210bb94f31bab5b329dd9133561d2c04f65aa URL: https://gitlab.winehq.org/wine/wine/-/commit/5e8210bb94f31bab5b329dd9133561d...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Tue Aug 15 19:46:26 2023 +0300
mshtml: Move console to the inner window.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
---
dlls/mshtml/htmlwindow.c | 16 +++++++--------- dlls/mshtml/mshtml_private.h | 3 +-- 2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index e668f8a5d2b..26964b3216f 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -257,9 +257,6 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface) TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) { - if (This->console) - IWineMSHTMLConsole_Release(This->console); - if(is_outer_window(This)) release_outer_window(This->outer_window); else @@ -3255,15 +3252,16 @@ static HRESULT WINAPI window_private_postMessage(IWineHTMLWindowPrivate *iface, static HRESULT WINAPI window_private_get_console(IWineHTMLWindowPrivate *iface, IDispatch **console) { HTMLWindow *This = impl_from_IWineHTMLWindowPrivateVtbl(iface); + HTMLInnerWindow *window = This->inner_window;
TRACE("iface %p, console %p.\n", iface, console);
- if (!This->console) - create_console(dispex_compat_mode(&This->inner_window->event_target.dispex), &This->console); + if (!window->console) + create_console(dispex_compat_mode(&window->event_target.dispex), &window->console);
- *console = (IDispatch *)This->console; - if (This->console) - IWineMSHTMLConsole_AddRef(This->console); + *console = (IDispatch *)window->console; + if (window->console) + IWineMSHTMLConsole_AddRef(window->console); return S_OK; }
@@ -3725,7 +3723,7 @@ static void HTMLWindow_unlink(DispatchEx *dispex)
TRACE("%p\n", This);
- unlink_ref(&This->base.console); + unlink_ref(&This->console); detach_inner_window(This);
if(This->doc) { diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 32ea4c9c9ea..2a608efcfc6 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -569,8 +569,6 @@ struct HTMLWindow { IWineHTMLWindowPrivate IWineHTMLWindowPrivate_iface; IWineHTMLWindowCompatPrivate IWineHTMLWindowCompatPrivate_iface;
- IWineMSHTMLConsole *console; - LONG ref;
HTMLInnerWindow *inner_window; @@ -625,6 +623,7 @@ struct HTMLInnerWindow { IOmNavigator *navigator; IHTMLStorage *session_storage; IHTMLStorage *local_storage; + IWineMSHTMLConsole *console;
BOOL performance_initialized; VARIANT performance;