Jacek Caban : jscript: Don' t pass EXPR_NEWREF to name expression in array_expression_eval.
Alexandre Julliard
julliard at winehq.org
Thu Dec 15 12:47:22 CST 2011
Module: wine
Branch: master
Commit: 43a2d8b9901d3616745a38eef85ab0599e18f3c0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=43a2d8b9901d3616745a38eef85ab0599e18f3c0
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Dec 15 15:43:43 2011 +0100
jscript: Don't pass EXPR_NEWREF to name expression in array_expression_eval.
---
dlls/jscript/engine.c | 2 +-
dlls/jscript/tests/lang.js | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index c7ed6d7..cdfc4e3 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -1473,7 +1473,7 @@ HRESULT array_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flag
if(FAILED(hres))
return hres;
- hres = expr_eval(ctx, expr->expression2, EXPR_NEWREF, ei, &exprval);
+ hres = expr_eval(ctx, expr->expression2, 0, ei, &exprval);
if(SUCCEEDED(hres)) {
hres = exprval_to_value(ctx, &exprval, ei, &val);
exprval_release(&exprval);
diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js
index 5677d32..165e70e 100644
--- a/dlls/jscript/tests/lang.js
+++ b/dlls/jscript/tests/lang.js
@@ -220,9 +220,13 @@ ok((~tmp.nonexistent) === -1, "!tmp.nonexistent = " + ~tmp.nonexistent);
ok(!("nonexistent" in tmp), "nonexistent is in tmp after '~' expression")
tmp = new Object();
-ok(isNaN(tmp.nonexistent), "!tmp.nonexistent = " + (+tmp.nonexistent));
+ok(isNaN(+tmp.nonexistent), "!tmp.nonexistent = " + (+tmp.nonexistent));
ok(!("nonexistent" in tmp), "nonexistent is in tmp after '+' expression")
+tmp = new Object();
+tmp[tmp.nonexistent];
+ok(!("nonexistent" in tmp), "nonexistent is in tmp after array expression")
+
tmp = 0;
if(true)
tmp = 1;
More information about the wine-cvs
mailing list