- if (callType == CallTypeHost)
- return callData.native.function(exec, asObject(functionObject), thisValue, args);
- ASSERT(callType == CallTypeJS);
- // FIXME: Can this be done more efficiently using the callData?
- return asFunction(functionObject)->call(exec, thisValue, args);
+ ASSERT(callType == CallTypeJS || callType == CallTypeHost);
+ ASSERT(isValidThisObject(thisValue, exec));
+ return exec->interpreter()->executeCall(exec, asObject(functionObject), callType, callData, thisValue, args);