Gabriel Ivăncescu : jscript: Use the proper variable_obj for bytecodes with named items.
Alexandre Julliard
julliard at winehq.org
Wed Mar 18 15:42:02 CDT 2020
Module: wine
Branch: master
Commit: b7ddcbbc18addf504d477cdc505af44259cc1e8e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b7ddcbbc18addf504d477cdc505af44259cc1e8e
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Wed Mar 18 15:19:48 2020 +0200
jscript: Use the proper variable_obj for bytecodes with named items.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/jscript/engine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 8914e760ed..59f37779a1 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -3030,6 +3030,8 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi
}else if(!(flags & (EXEC_GLOBAL | EXEC_EVAL))) {
hres = create_dispex(ctx, NULL, NULL, &variable_obj);
if(FAILED(hres)) return hres;
+ }else if(bytecode->named_item) {
+ variable_obj = jsdisp_addref(bytecode->named_item->script_obj);
}else {
variable_obj = jsdisp_addref(ctx->global);
}
More information about the wine-cvs
mailing list