summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-08-24 09:36:20 +0200
committerShane Kearns <shane.kearns@sosco.com>2009-08-24 09:36:20 +0200
commit898cba2245b6fafa3820b44203442fedd9f7ed73 (patch)
treec7545af2a15396c7c5d79612d7073de9b4274d43 /src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
parent6dade01b24f3fd314cb6ec9c2979348e78740a52 (diff)
parent028655065de7f989a35b63bcab583767aba9c048 (diff)
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
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