TRACE("\n");
- if(!(function = function_from_vdisp(jsthis))) {
- FIXME("dispex is not a function\n");
- return E_FAIL;
- }
+ if(!(function = function_this(jsthis)))
+ return throw_type_error(ctx, ei, IDS_NOT_FUNC, NULL);
argc = arg_cnt(dp);
-
if(argc) {
hres = to_object(ctx, get_arg(dp,0), &this_obj);
if(FAILED(hres))
TRACE("\n");
- if(!(function = function_from_vdisp(jsthis))) {
- FIXME("dispex is not a function\n");
- return E_FAIL;
- }
+ if(!(function = function_this(jsthis)))
+ return throw_type_error(ctx, ei, IDS_NOT_FUNC, NULL);
argc = arg_cnt(dp);
if(argc) {
testArrayThis("toString");
+function testFunctionThis(func) {
+ testThisExcept(Function.prototype[func], -2146823286);
+}
+
+testFunctionThis("toString");
+testFunctionThis("call");
+testFunctionThis("apply");
+
function testArrayHostThis(func) {
exception_test(function() { Array.prototype[func].call(testObj); }, "TypeError", -2146823274);
}