X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/14957cd040308e3eeec43d26bae5d76da13fcd85..40a37d088818fc2fbeba2ef850dbcaaf294befbf:/runtime/CallData.cpp diff --git a/runtime/CallData.cpp b/runtime/CallData.cpp index 018e2ca..6d00109 100644 --- a/runtime/CallData.cpp +++ b/runtime/CallData.cpp @@ -29,6 +29,7 @@ #include "Executable.h" #include "Interpreter.h" #include "JSFunction.h" +#include "JSCInlines.h" namespace JSC { @@ -38,4 +39,17 @@ JSValue call(ExecState* exec, JSValue functionObject, CallType callType, const C return exec->interpreter()->executeCall(exec, asObject(functionObject), callType, callData, thisValue, args); } +JSValue call(ExecState* exec, JSValue functionObject, CallType callType, const CallData& callData, JSValue thisValue, const ArgList& args, JSValue* exception) +{ + JSValue result = call(exec, functionObject, callType, callData, thisValue, args); + if (exec->hadException()) { + if (exception) + *exception = exec->exception(); + exec->clearException(); + return jsUndefined(); + } + RELEASE_ASSERT(result); + return result; +} + } // namespace JSC