Module: wine Branch: master Commit: 1f4cdeeeac2b6fd6421231c6c449e9d8a4712fc1 URL: https://gitlab.winehq.org/wine/wine/-/commit/1f4cdeeeac2b6fd6421231c6c449e9d...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Thu Jun 22 16:19:01 2023 +0300
jscript: Always create detached variable objects with no class.
As it is done in exec_source. This matters as we actually have a check in exprval_call that relies on this (because scope variable objects must never be exposed).
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
---
dlls/jscript/engine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 379d209f0b0..1bf5bb77858 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -749,7 +749,7 @@ static HRESULT detach_scope(script_ctx_t *ctx, call_frame_t *frame, scope_chain_
if (!scope->obj) { - if (FAILED(hres = create_object(ctx, NULL, &jsobj))) + if (FAILED(hres = create_dispex(ctx, NULL, NULL, &jsobj))) return hres; scope->obj = to_disp(jsobj); } @@ -1071,7 +1071,7 @@ static HRESULT scope_init_locals(script_ctx_t *ctx) } else if (!scope->obj) { - if (FAILED(hres = create_object(ctx, NULL, &jsobj))) + if (FAILED(hres = create_dispex(ctx, NULL, NULL, &jsobj))) return hres; scope->obj = to_disp(jsobj); }