Commit 4b8adbef authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Create undeclared values to script_disp instead of var_disp.

parent 9c18f6ef
...@@ -537,11 +537,11 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, js ...@@ -537,11 +537,11 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, js
return S_OK; return S_OK;
if(flags & EXPR_NEWREF) { if(flags & EXPR_NEWREF) {
hres = jsdisp_get_id(ctx->var_disp, identifier, fdexNameEnsure, &id); hres = jsdisp_get_id(ctx->parser->script->script_disp, identifier, fdexNameEnsure, &id);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
exprval_set_idref(ret, (IDispatch*)_IDispatchEx_(ctx->var_disp), id); exprval_set_idref(ret, (IDispatch*)_IDispatchEx_(ctx->parser->script->script_disp), id);
return S_OK; return S_OK;
} }
......
...@@ -907,4 +907,7 @@ function () {} nosemicolon(); ...@@ -907,4 +907,7 @@ function () {} nosemicolon();
ok(typeof(doesnotexist) === "undefined", "typeof(doesnotexist) = " + typeof(doesnotexist)); ok(typeof(doesnotexist) === "undefined", "typeof(doesnotexist) = " + typeof(doesnotexist));
(function() { newValue = 1; })();
ok(newValue === 1, "newValue = " + newValue);
reportSuccess(); reportSuccess();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment