Commit d6648e4f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Throw TypeError in in_eval.

parent be3dc381
......@@ -2065,10 +2065,8 @@ static HRESULT in_eval(exec_ctx_t *ctx, VARIANT *lval, VARIANT *obj, jsexcept_t
BSTR str;
HRESULT hres;
if(V_VT(obj) != VT_DISPATCH) {
FIXME("throw TypeError\n");
return E_FAIL;
}
if(V_VT(obj) != VT_DISPATCH || !V_DISPATCH(obj))
return throw_type_error(ctx->parser->script, ei, IDS_OBJECT_EXPECTED, NULL);
hres = to_string(ctx->parser->script, lval, ei, &str);
if(FAILED(hres))
......
......@@ -1891,6 +1891,9 @@ exception_test(function() {encodeURI('\udcaa');}, "URIError", -2146823264);
exception_test(function() {(new Object()) instanceof 3;}, "TypeError", -2146823286);
exception_test(function() {(new Object()) instanceof null;}, "TypeError", -2146823286);
exception_test(function() {(new Object()) instanceof nullDisp;}, "TypeError", -2146823286);
exception_test(function() {"test" in 3;}, "TypeError", -2146823281);
exception_test(function() {"test" in null;}, "TypeError", -2146823281);
exception_test(function() {"test" in nullDisp;}, "TypeError", -2146823281);
function testThisExcept(func, number) {
exception_test(function() {func.call(new Object())}, "TypeError", number);
......
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