aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@digia.com>2013-04-23 13:44:41 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-23 14:15:17 +0200
commit33e0dd64f9cb4e517d1fc126e645b341803fb481 (patch)
treebe844e94527f55637ca9654de6befa98f9ab478c /src/qml/debugger
parent30eea7e16959152d3323f41c11464243665b15a0 (diff)
V8Debugging: Set Isolate when sending debug messages to v8
Pass the Isolate used for setting the DebugMessageDispatchHandler to SendDebugMessage. This is to ensure that the proper dispatch handler is called since the Debugger is per Isolate. Change-Id: I4497155b90d4b678a5c4116859269892441ce70e Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/qml/debugger')
-rw-r--r--src/qml/debugger/qv8debugservice.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/debugger/qv8debugservice.cpp b/src/qml/debugger/qv8debugservice.cpp
index f41907a032..9045b4b50e 100644
--- a/src/qml/debugger/qv8debugservice.cpp
+++ b/src/qml/debugger/qv8debugservice.cpp
@@ -107,7 +107,8 @@ class QV8DebugServicePrivate : public QQmlDebugServicePrivate
{
public:
QV8DebugServicePrivate()
- : engine(0)
+ : engine(0),
+ debugIsolate(0)
{
}
@@ -119,6 +120,7 @@ public:
QWaitCondition initializeCondition;
QStringList breakOnSignals;
const QV8Engine *engine;
+ v8::Isolate *debugIsolate;
};
QV8DebugService::QV8DebugService(QObject *parent)
@@ -186,6 +188,9 @@ void QV8DebugService::signalEmitted(const QString &signal)
// executed in the gui thread
void QV8DebugService::init()
{
+ Q_D(QV8DebugService);
+ if (!d->debugIsolate)
+ d->debugIsolate = v8::Isolate::GetCurrent();
v8::Debug::SetMessageHandler2(DebugMessageHandler);
v8::Debug::SetDebugMessageDispatchHandler(DebugMessageDispatchHandler);
QV4Compiler::enableV4(false);
@@ -267,7 +272,8 @@ void QV8DebugService::messageReceived(const QByteArray &message)
void QV8DebugService::sendDebugMessage(const QString &message)
{
- v8::Debug::SendCommand(message.utf16(), message.size());
+ Q_D(QV8DebugService);
+ v8::Debug::SendCommand(message.utf16(), message.size(), 0, d->debugIsolate);
}
void QV8DebugService::processDebugMessages()