summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/CallData.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-05-24 08:28:08 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-05-24 08:28:08 +0000
commita4e969f4965059196ca948db781e52f7cfebf19e (patch)
tree6ca352808c8fdc52006a0f33f6ae3c593b23867d /Source/JavaScriptCore/runtime/CallData.cpp
parent41386e9cb918eed93b3f13648cbef387e371e451 (diff)
downloadWebKitGtk-tarball-a4e969f4965059196ca948db781e52f7cfebf19e.tar.gz
webkitgtk-2.12.3webkitgtk-2.12.3
Diffstat (limited to 'Source/JavaScriptCore/runtime/CallData.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/CallData.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/runtime/CallData.cpp b/Source/JavaScriptCore/runtime/CallData.cpp
index cf0ba7992..42c80ddb6 100644
--- a/Source/JavaScriptCore/runtime/CallData.cpp
+++ b/Source/JavaScriptCore/runtime/CallData.cpp
@@ -28,8 +28,9 @@
#include "Executable.h"
#include "Interpreter.h"
+#include "JSCInlines.h"
#include "JSFunction.h"
-#include "Operations.h"
+#include "ScriptProfilingScope.h"
namespace JSC {
@@ -39,4 +40,28 @@ 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, NakedPtr<Exception>& returnedException)
+{
+ JSValue result = call(exec, functionObject, callType, callData, thisValue, args);
+ if (exec->hadException()) {
+ returnedException = exec->exception();
+ exec->clearException();
+ return jsUndefined();
+ }
+ RELEASE_ASSERT(result);
+ return result;
+}
+
+JSValue profiledCall(ExecState* exec, ProfilingReason reason, JSValue functionObject, CallType callType, const CallData& callData, JSValue thisValue, const ArgList& args)
+{
+ ScriptProfilingScope profilingScope(exec->vmEntryGlobalObject(), reason);
+ return call(exec, functionObject, callType, callData, thisValue, args);
+}
+
+JSValue profiledCall(ExecState* exec, ProfilingReason reason, JSValue functionObject, CallType callType, const CallData& callData, JSValue thisValue, const ArgList& args, NakedPtr<Exception>& returnedException)
+{
+ ScriptProfilingScope profilingScope(exec->vmEntryGlobalObject(), reason);
+ return call(exec, functionObject, callType, callData, thisValue, args, returnedException);
+}
+
} // namespace JSC