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>
This commit is contained in:
Gabriel Ivăncescu 2023-06-22 16:19:01 +03:00 committed by Alexandre Julliard
parent 4a78b9914f
commit 1f4cdeeeac

View file

@ -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);
}