From 545e470e52f0ac6a3a072bf559c796b42c6066b6 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 15 Jun 2010 19:36:43 +0100 Subject: Merge webkit.org at r61121: Initial merge by git. Change-Id: Icd6db395c62285be384d137164d95d7466c98760 --- JavaScriptCore/API/JSCallbackFunction.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'JavaScriptCore/API/JSCallbackFunction.cpp') diff --git a/JavaScriptCore/API/JSCallbackFunction.cpp b/JavaScriptCore/API/JSCallbackFunction.cpp index 9db9983..c488aa6 100644 --- a/JavaScriptCore/API/JSCallbackFunction.cpp +++ b/JavaScriptCore/API/JSCallbackFunction.cpp @@ -29,6 +29,7 @@ #include "APIShims.h" #include "APICast.h" #include "CodeBlock.h" +#include "ExceptionHelpers.h" #include "JSFunction.h" #include "FunctionPrototype.h" #include @@ -47,7 +48,7 @@ JSCallbackFunction::JSCallbackFunction(ExecState* exec, JSGlobalObject* globalOb { } -JSValue JSCallbackFunction::call(ExecState* exec) +EncodedJSValue JSCallbackFunction::call(ExecState* exec) { JSContextRef execRef = toRef(exec); JSObjectRef functionRef = toRef(exec->callee()); @@ -65,9 +66,9 @@ JSValue JSCallbackFunction::call(ExecState* exec) result = static_cast(toJS(functionRef))->m_callback(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception); } if (exception) - exec->setException(toJS(exec, exception)); + throwError(exec, toJS(exec, exception)); - return toJS(exec, result); + return JSValue::encode(toJS(exec, result)); } CallType JSCallbackFunction::getCallData(CallData& callData) -- cgit v1.1