summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-08-11 08:59:22 (GMT)
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-08-11 08:59:22 (GMT)
commit938c50675fbcc6659e25921caf41a06f2d8a49cb (patch)
tree609a00e1b456a76123a6b59ee9d0eeb75d70cbc1
parenta23288b0a563b6bcc3fc1cf49a224f21f531810c (diff)
downloadQt-938c50675fbcc6659e25921caf41a06f2d8a49cb.zip
Qt-938c50675fbcc6659e25921caf41a06f2d8a49cb.tar.gz
Qt-938c50675fbcc6659e25921caf41a06f2d8a49cb.tar.bz2
Call to JSC::Debugger's new events that where created in
b62ab93d001d2f3238e24faa133720cb877e3023 commit. Workaround for multiple decorators problem. FunctionWrapper and NativeConstrWrapper needs access to original result value (from native function call). Solution was to move part of the NativeConstrWrapper's functionality (functionExit debugger's event) to FunctionWrapper::proxyConstruct.
-rw-r--r--src/script/bridge/qscriptfunction.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/script/bridge/qscriptfunction.cpp b/src/script/bridge/qscriptfunction.cpp
index ac8ca83..2124128 100644
--- a/src/script/bridge/qscriptfunction.cpp
+++ b/src/script/bridge/qscriptfunction.cpp
@@ -44,9 +44,12 @@
#include "private/qscriptengine_p.h"
#include "qscriptcontext.h"
#include "private/qscriptcontext_p.h"
+#include "private/qscriptvalue_p.h"
#include "qscriptactivationobject_p.h"
#include "JSGlobalObject.h"
+#include "DebuggerCallFrame.h"
+#include "Debugger.h"
namespace JSC
@@ -77,6 +80,9 @@ FunctionWrapper::~FunctionWrapper()
JSC::ConstructType FunctionWrapper::getConstructData(JSC::ConstructData& consData)
{
consData.native.function = proxyConstruct;
+#ifdef QT_BUILD_SCRIPT_LIB
+ consData.native.function.doNotCallDebuggerFunctionExit();
+#endif
return JSC::ConstructTypeHost;
}
@@ -108,7 +114,12 @@ JSC::JSObject* FunctionWrapper::proxyConstruct(JSC::ExecState *exec, JSC::JSObje
QScriptPushScopeHelper scope(exec, true);
QScriptValue defaultObject = ctx->thisObject();
+
QScriptValue result = self->data->function(ctx, QScriptEnginePrivate::get(eng_p));
+#ifdef QT_BUILD_SCRIPT_LIB
+ if (JSC::Debugger* debugger = exec->lexicalGlobalObject()->debugger())
+ debugger->functionExit(QScriptValuePrivate::get(result)->jscValue, -1);
+#endif
if (!result.isObject())
result = defaultObject;