jscript: Create undeclared values to script_disp instead of var_disp.
This commit is contained in:
parent
9c18f6ef5d
commit
4b8adbef86
|
@ -537,11 +537,11 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, js
|
|||
return S_OK;
|
||||
|
||||
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))
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -907,4 +907,7 @@ function () {} nosemicolon();
|
|||
|
||||
ok(typeof(doesnotexist) === "undefined", "typeof(doesnotexist) = " + typeof(doesnotexist));
|
||||
|
||||
(function() { newValue = 1; })();
|
||||
ok(newValue === 1, "newValue = " + newValue);
|
||||
|
||||
reportSuccess();
|
||||
|
|
Loading…
Reference in New Issue