[PATCH 0/2] MR7311: mshtml: Clear the documents list when detaching inner window.
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> So we don't traverse them again later; they could have been destroyed, but they don't get removed from the list since script_global is set to NULL (which could also be destroyed first). Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlwindow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 31255e7cebc..b56c6a327cc 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -128,6 +128,7 @@ static void detach_inner_window(HTMLInnerWindow *window) LIST_FOR_EACH_ENTRY(doc_iter, &window->documents, HTMLDocumentNode, script_global_entry) doc_iter->script_global = NULL; + list_init(&window->documents); if(doc) detach_document_node(doc); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7311
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/jscript/engine.c | 4 ++-- dlls/jscript/jsutils.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index c95fcace84a..d36567826dc 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -1840,7 +1840,7 @@ static HRESULT interp_carray_set(script_ctx_t *ctx) array = stack_top(ctx); assert(is_object_instance(array)); - hres = jsdisp_propput_idx(to_jsdisp(get_object(array)), index, value); + hres = jsdisp_propput_idx(as_jsdisp(get_object(array)), index, value); jsval_release(value); return hres; } @@ -1887,7 +1887,7 @@ static HRESULT interp_obj_prop(script_ctx_t *ctx) jsdisp_t *func; assert(is_object_instance(val)); - func = to_jsdisp(get_object(val)); + func = as_jsdisp(get_object(val)); desc.mask = desc.flags; if(type == PROPERTY_DEFINITION_GETTER) { diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index cb139977a84..2c6516e06bb 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -293,7 +293,7 @@ HRESULT variant_to_jsval(script_ctx_t *ctx, VARIANT *var, jsval_t *r) hres = IWineJSDispatchHost_GetJSDispatch(disp_host, &jsdisp_iface); IWineJSDispatchHost_Release(disp_host); if(SUCCEEDED(hres)) { - jsdisp_t *jsdisp = to_jsdisp((IDispatch *)jsdisp_iface); + jsdisp_t *jsdisp = as_jsdisp((IDispatch *)jsdisp_iface); if(jsdisp->ctx == ctx) { *r = jsval_obj(jsdisp); return S_OK; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7311
This merge request was approved by Jacek Caban. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7311
participants (2)
-
Gabriel Ivăncescu -
Jacek Caban (@jacek)