diff options
Diffstat (limited to 'src/qml/debugger')
-rw-r--r-- | src/qml/debugger/qqmlenginedebugservice.cpp | 5 | ||||
-rw-r--r-- | src/qml/debugger/qv8debugservice.cpp | 25 | ||||
-rw-r--r-- | src/qml/debugger/qv8profilerservice.cpp | 36 |
3 files changed, 39 insertions, 27 deletions
diff --git a/src/qml/debugger/qqmlenginedebugservice.cpp b/src/qml/debugger/qqmlenginedebugservice.cpp index c4c8cb2fcf..65f7419ee3 100644 --- a/src/qml/debugger/qqmlenginedebugservice.cpp +++ b/src/qml/debugger/qqmlenginedebugservice.cpp @@ -626,7 +626,7 @@ bool QQmlEngineDebugService::setBinding(int objectId, false, filename, line, column); QQmlPropertyPrivate::takeSignalExpression(property, qmlExpression); } else if (property.isProperty()) { - QQmlBinding *binding = new QQmlBinding(expression.toString(), false, object, QQmlContextData::get(context), filename, line, column);; + QQmlBinding *binding = new QQmlBinding(expression.toString(), object, QQmlContextData::get(context), filename, line, column);; binding->setTarget(property); QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::setBinding(property, binding); if (oldBinding) @@ -742,7 +742,8 @@ bool QQmlEngineDebugService::setMethodBody(int objectId, const QString &method, Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this int lineNumber = vmeMetaObject->vmeMethodLineNumber(prop->coreIndex); - vmeMetaObject->setVmeMethod(prop->coreIndex, QQmlExpressionPrivate::evalFunction(contextData, object, jsfunction, contextData->url.toString(), lineNumber)); + vmeMetaObject->setVmeMethod(prop->coreIndex, + QQmlExpressionPrivate::evalFunction(contextData, object, jsfunction, contextData->url.toString(), lineNumber)); return true; } diff --git a/src/qml/debugger/qv8debugservice.cpp b/src/qml/debugger/qv8debugservice.cpp index 9045b4b50e..eeab21d6ab 100644 --- a/src/qml/debugger/qv8debugservice.cpp +++ b/src/qml/debugger/qv8debugservice.cpp @@ -41,8 +41,6 @@ #include "qv8debugservice_p.h" #include "qqmldebugservice_p_p.h" -#include <private/qjsconverter_impl_p.h> -#include <private/qv4compiler_p.h> #include <private/qv8engine_p.h> #include <QtCore/QHash> @@ -88,6 +86,7 @@ void DebugMessageDispatchHandler() QMetaObject::invokeMethod(v8ServiceInstancePtr, "processDebugMessages", Qt::QueuedConnection); } +/* ### FIXME: v4 void DebugMessageHandler(const v8::Debug::Message& message) { v8::DebugEvent event = message.GetEvent(); @@ -102,13 +101,13 @@ void DebugMessageHandler(const v8::Debug::Message& message) v8ServiceInstancePtr->debugMessageHandler(QJSConverter::toString(message.GetJSON())); } +*/ class QV8DebugServicePrivate : public QQmlDebugServicePrivate { public: QV8DebugServicePrivate() - : engine(0), - debugIsolate(0) + : engine(0) { } @@ -120,7 +119,6 @@ public: QWaitCondition initializeCondition; QStringList breakOnSignals; const QV8Engine *engine; - v8::Isolate *debugIsolate; }; QV8DebugService::QV8DebugService(QObject *parent) @@ -188,21 +186,24 @@ void QV8DebugService::signalEmitted(const QString &signal) // executed in the gui thread void QV8DebugService::init() { +#if 0 // ### FIXME: v4 Q_D(QV8DebugService); if (!d->debugIsolate) d->debugIsolate = v8::Isolate::GetCurrent(); v8::Debug::SetMessageHandler2(DebugMessageHandler); v8::Debug::SetDebugMessageDispatchHandler(DebugMessageDispatchHandler); QV4Compiler::enableV4(false); +#endif } // executed in the gui thread void QV8DebugService::scheduledDebugBreak(bool schedule) { - if (schedule) - v8::Debug::DebugBreak(); - else - v8::Debug::CancelDebugBreak(); +// ### FIXME: v4 +// if (schedule) +// v8::Debug::DebugBreak(); +// else +// v8::Debug::CancelDebugBreak(); } // executed in the debugger thread @@ -272,16 +273,16 @@ void QV8DebugService::messageReceived(const QByteArray &message) void QV8DebugService::sendDebugMessage(const QString &message) { +#if 0 // ### FIXME: v4 Q_D(QV8DebugService); v8::Debug::SendCommand(message.utf16(), message.size(), 0, d->debugIsolate); +#endif } void QV8DebugService::processDebugMessages() { Q_D(QV8DebugService); - v8::HandleScope handleScope; - v8::Context::Scope contextScope(d->engine->context()); - v8::Debug::ProcessDebugMessages(); +// ### FIXME: v4 v8::Debug::ProcessDebugMessages(); } QByteArray QV8DebugServicePrivate::packMessage(const QString &type, const QString &message) diff --git a/src/qml/debugger/qv8profilerservice.cpp b/src/qml/debugger/qv8profilerservice.cpp index 7aa029fb6b..a94f611c27 100644 --- a/src/qml/debugger/qv8profilerservice.cpp +++ b/src/qml/debugger/qv8profilerservice.cpp @@ -41,7 +41,6 @@ #include "qv8profilerservice_p.h" #include "qqmldebugservice_p_p.h" -#include "private/qjsconverter_impl_p.h" #include <private/qv8profiler_p.h> #include <QtCore/QHash> @@ -52,6 +51,8 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QV8ProfilerService, v8ProfilerInstance) +#if 0 +// ### FIXME: v4 class DebugServiceOutputStream : public v8::OutputStream { public: @@ -68,6 +69,7 @@ public: } QList<QByteArray> messages; }; +#endif // convert to a QByteArray that can be sent to the debug client QByteArray QV8ProfilerData::toByteArray() const @@ -90,10 +92,10 @@ public: { } - void takeSnapshot(v8::HeapSnapshot::Type); - - void printProfileTree(const v8::CpuProfileNode *node, int level = 0); - void sendMessages(); + // ### FIXME: v4 +// void takeSnapshot(v8::HeapSnapshot::Type); +// void printProfileTree(const v8::CpuProfileNode *node, int level = 0); +// void sendMessages(); QList<QV8ProfilerData> m_data; @@ -198,9 +200,9 @@ void QV8ProfilerService::startProfiling(const QString &title) if (d->m_ongoing.contains(title)) return; - v8::HandleScope handle_scope; - v8::Handle<v8::String> v8title = v8::String::New(reinterpret_cast<const uint16_t*>(title.data()), title.size()); - v8::CpuProfiler::StartProfiling(v8title); +// v8::Handle<v8::String> v8title = v8::String::New(reinterpret_cast<const uint16_t*>(title.data()), title.size()); + // ### FIXME: v4 +// v8::CpuProfiler::StartProfiling(v8title); d->m_ongoing.append(title); @@ -221,6 +223,8 @@ void QV8ProfilerService::stopProfiling(const QString &title) return; d->m_ongoing.removeOne(title); +#if 0 + // ### FIXME: v4 v8::HandleScope handle_scope; v8::Handle<v8::String> v8title = v8::String::New(reinterpret_cast<const uint16_t*>(title.data()), title.size()); const v8::CpuProfile *cpuProfile = v8::CpuProfiler::StopProfiling(v8title); @@ -236,26 +240,32 @@ void QV8ProfilerService::stopProfiling(const QString &title) sendMessage(data); } +#endif } void QV8ProfilerService::takeSnapshot() { Q_D(QV8ProfilerService); - d->takeSnapshot(v8::HeapSnapshot::kFull); + // ### FIXME: v4 +// d->takeSnapshot(v8::HeapSnapshot::kFull); } void QV8ProfilerService::deleteSnapshots() { - v8::HeapProfiler::DeleteAllSnapshots(); + // ### FIXME: v4 +// v8::HeapProfiler::DeleteAllSnapshots(); } void QV8ProfilerService::sendProfilingData() { Q_D(QV8ProfilerService); // Send messages to client - d->sendMessages(); + // ### FIXME: v4 +// d->sendMessages(); } +#if 0 +// ### FIXME: v4 void QV8ProfilerServicePrivate::printProfileTree(const v8::CpuProfileNode *node, int level) { for (int index = 0 ; index < node->GetChildrenCount() ; index++) { @@ -281,7 +291,7 @@ void QV8ProfilerServicePrivate::takeSnapshot(v8::HeapSnapshot::Type snapshotType Q_Q(QV8ProfilerService); v8::HandleScope scope; - v8::Local<v8::String> title = v8::String::New(""); + v8::Handle<v8::String> title = v8::String::New(""); DebugServiceOutputStream outputStream; const v8::HeapSnapshot *snapshot = v8::HeapProfiler::TakeSnapshot(title, snapshotType); @@ -314,6 +324,6 @@ void QV8ProfilerServicePrivate::sendMessages() q->sendMessages(messages); } - +#endif QT_END_NAMESPACE |