diff --git a/dlls/jscript/array.c b/dlls/jscript/array.c index 0af6df1c6dc..b2bd5b2de48 100644 --- a/dlls/jscript/array.c +++ b/dlls/jscript/array.c @@ -770,6 +770,8 @@ static HRESULT Array_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS TRACE("\n"); switch(flags) { + case INVOKE_FUNC: + return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); case INVOKE_PROPERTYGET: return array_join(dispex, lcid, ((ArrayInstance*)dispex)->length, default_separatorW, retv, ei, sp); default: diff --git a/dlls/jscript/bool.c b/dlls/jscript/bool.c index 2b5152ad3f7..bfacebf3ec6 100644 --- a/dlls/jscript/bool.c +++ b/dlls/jscript/bool.c @@ -116,8 +116,18 @@ static HRESULT Bool_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags, DIS static HRESULT Bool_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + switch(flags) { + case INVOKE_FUNC: + return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; + } static const builtin_prop_t Bool_props[] = { diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index b33be0b9f6f..5085f212ebe 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -2040,8 +2040,17 @@ static HRESULT Date_getYear(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM static HRESULT Date_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + switch(flags) { + case INVOKE_FUNC: + return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; } static const builtin_prop_t Date_props[] = { diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index 49bdb071799..fb37fbae794 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -141,8 +141,17 @@ static HRESULT Error_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags, static HRESULT Error_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + switch(flags) { + case INVOKE_FUNC: + return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; } static void Error_destructor(DispatchEx *dispex) diff --git a/dlls/jscript/number.c b/dlls/jscript/number.c index 28049a9270a..0aeeab6386a 100644 --- a/dlls/jscript/number.c +++ b/dlls/jscript/number.c @@ -241,6 +241,8 @@ static HRESULT Number_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM NumberInstance *number = (NumberInstance*)dispex; switch(flags) { + case INVOKE_FUNC: + return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); case DISPATCH_PROPERTYGET: *retv = number->num; break; diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index 8e0aad6f12f..737230ada85 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -120,6 +120,8 @@ static HRESULT Object_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM TRACE("\n"); switch(flags) { + case INVOKE_FUNC: + return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); case DISPATCH_PROPERTYGET: V_VT(retv) = VT_BSTR; V_BSTR(retv) = SysAllocString(default_valueW); diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c index 9722919f722..a4d640ef860 100644 --- a/dlls/jscript/regexp.c +++ b/dlls/jscript/regexp.c @@ -3516,8 +3516,17 @@ static HRESULT RegExp_test(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS static HRESULT RegExp_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + switch(flags) { + case INVOKE_FUNC: + return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; } static void RegExp_destructor(DispatchEx *dispex) diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index a0ca268ccde..6695bf893cb 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -1485,6 +1485,8 @@ static HRESULT String_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM TRACE("\n"); switch(flags) { + case INVOKE_FUNC: + return throw_type_error(dispex->ctx, ei, IDS_NOT_FUNC, NULL); case DISPATCH_PROPERTYGET: { BSTR str = SysAllocString(This->str); if(!str) diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 2ed8bda2209..74284139060 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1315,5 +1315,7 @@ exception_test(function() {arr.toString = Number.prototype.toString; arr.toStrin exception_test(function() {(new Number(3)).toString(1);}, "TypeError", -2146828283); exception_test(function() {not_existing_variable.something();}, "TypeError", -2146823279); exception_test(function() {arr.toString = Function.prototype.toString; arr.toString();}, "TypeError", -2146823286); +exception_test(function() {date();}, "TypeError", -2146823286); +exception_test(function() {arr();}, "TypeError", -2146823286); reportSuccess();