Jacek Caban : jscript: Ignore an attempt to set visible host object identifier's value in ES5 mode.
Alexandre Julliard
julliard at winehq.org
Mon Apr 12 16:11:26 CDT 2021
Module: wine
Branch: master
Commit: c7fc18a6c771d6796e6dee67c9616467ce697821
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c7fc18a6c771d6796e6dee67c9616467ce697821
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Apr 12 15:47:51 2021 +0200
jscript: Ignore an attempt to set visible host object identifier's value in ES5 mode.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/jscript/engine.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 106fdabd81c..06b0fd673b3 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -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);
More information about the wine-cvs
mailing list