{
public:
QV8DebugServicePrivate()
- : engine(0)
+ : engine(0),
+ debugIsolate(0)
{
}
QWaitCondition initializeCondition;
QStringList breakOnSignals;
const QV8Engine *engine;
+ v8::Isolate *debugIsolate;
};
QV8DebugService::QV8DebugService(QObject *parent)
// 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);
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()