summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
index 7ee59d7ef..3dfc9180d 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
@@ -28,15 +28,38 @@
#include "JSFunction.h"
+
+#ifdef QT_BUILD_SCRIPT_LIB
+#include "Debugger.h"
+#include "DebuggerCallFrame.h"
+#include "JSGlobalObject.h"
+#endif
+
namespace JSC {
-JSObject* construct(ExecState* exec, JSValue object, ConstructType constructType, const ConstructData& constructData, const ArgList& args)
+#ifdef QT_BUILD_SCRIPT_LIB
+JSObject* JSC::NativeConstrWrapper::operator() (ExecState* exec, JSObject* jsobj, const ArgList& argList) const
+{
+ Debugger* debugger = exec->lexicalGlobalObject()->debugger();
+ if (debugger)
+ debugger->callEvent(DebuggerCallFrame(exec), -1, -1);
+
+ JSObject* returnValue = ptr(exec, jsobj, argList);
+
+ if ((debugger) && (callDebuggerFunctionExit))
+ debugger->functionExit(JSValue(returnValue), -1);
+
+ return returnValue;
+}
+#endif
+
+JSObject* construct(ExecState* exec, JSValue callee, ConstructType constructType, const ConstructData& constructData, const ArgList& args)
{
if (constructType == ConstructTypeHost)
- return constructData.native.function(exec, asObject(object), args);
+ return constructData.native.function(exec, asObject(callee), args);
ASSERT(constructType == ConstructTypeJS);
// FIXME: Can this be done more efficiently using the constructData?
- return asFunction(object)->construct(exec, args);
+ return asFunction(callee)->construct(exec, args);
}
} // namespace JSC