[PATCH v11 1/3] jscript: Use the proper variable_obj for bytecodes with named items.

Gabriel Ivăncescu gabrielopcode at gmail.com
Wed Mar 18 08:19:48 CDT 2020


Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
 dlls/jscript/engine.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 8914e76..59f3777 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);
     }
-- 
2.21.0




More information about the wine-devel mailing list