jscript: Ignore an attempt to set visible host object identifier's value in ES5 mode.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-04-12 15:47:51 +02:00 committed by Alexandre Julliard
parent 3c91e5ed60
commit c7fc18a6c7
1 changed files with 2 additions and 1 deletions

View File

@ -1291,7 +1291,8 @@ static HRESULT interp_identifier_ref(script_ctx_t *ctx, BSTR identifier, unsigne
exprval_set_disp_ref(&exprval, to_disp(script_obj), id);
}
if(exprval.type == EXPRVAL_JSVAL || exprval.type == EXPRVAL_INVALID) {
if(exprval.type == EXPRVAL_INVALID ||
(exprval.type == EXPRVAL_JSVAL && ctx->version < SCRIPTLANGUAGEVERSION_ES5)) {
WARN("invalid ref\n");
exprval_release(&exprval);
exprval_set_exception(&exprval, JS_E_OBJECT_EXPECTED);