aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/debugger/qv8debugservice.cpp20
-rw-r--r--src/qml/debugger/qv8profilerservice.cpp30
-rw-r--r--src/qml/qml/ftw/qhashedstring.cpp4
-rw-r--r--src/qml/qml/ftw/qhashedstring_p.h1
-rw-r--r--src/qml/qml/v8/qv8debug_p.h2
-rw-r--r--src/qml/qml/v8/qv8engine_p.h8
-rw-r--r--src/qml/qml/v8/qv8profiler_p.h2
7 files changed, 42 insertions, 25 deletions
diff --git a/src/qml/debugger/qv8debugservice.cpp b/src/qml/debugger/qv8debugservice.cpp
index f41907a032..19008d9ede 100644
--- a/src/qml/debugger/qv8debugservice.cpp
+++ b/src/qml/debugger/qv8debugservice.cpp
@@ -88,6 +88,7 @@ void DebugMessageDispatchHandler()
QMetaObject::invokeMethod(v8ServiceInstancePtr, "processDebugMessages", Qt::QueuedConnection);
}
+/* ### FIXME: v4
void DebugMessageHandler(const v8::Debug::Message& message)
{
v8::DebugEvent event = message.GetEvent();
@@ -102,6 +103,7 @@ void DebugMessageHandler(const v8::Debug::Message& message)
v8ServiceInstancePtr->debugMessageHandler(QJSConverter::toString(message.GetJSON()));
}
+*/
class QV8DebugServicePrivate : public QQmlDebugServicePrivate
{
@@ -186,18 +188,20 @@ void QV8DebugService::signalEmitted(const QString &signal)
// executed in the gui thread
void QV8DebugService::init()
{
- v8::Debug::SetMessageHandler2(DebugMessageHandler);
- v8::Debug::SetDebugMessageDispatchHandler(DebugMessageDispatchHandler);
+// ### FIXME: v4
+// v8::Debug::SetMessageHandler2(DebugMessageHandler);
+// v8::Debug::SetDebugMessageDispatchHandler(DebugMessageDispatchHandler);
QV4Compiler::enableV4(false);
}
// 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
@@ -267,7 +271,7 @@ void QV8DebugService::messageReceived(const QByteArray &message)
void QV8DebugService::sendDebugMessage(const QString &message)
{
- v8::Debug::SendCommand(message.utf16(), message.size());
+// ### FIXME: v4 v8::Debug::SendCommand(message.utf16(), message.size());
}
void QV8DebugService::processDebugMessages()
@@ -275,7 +279,7 @@ 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..5d8873bada 100644
--- a/src/qml/debugger/qv8profilerservice.cpp
+++ b/src/qml/debugger/qv8profilerservice.cpp
@@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QV8ProfilerService, v8ProfilerInstance)
+#if 0
+// ### FIXME: v4
class DebugServiceOutputStream : public v8::OutputStream
{
public:
@@ -68,6 +70,7 @@ public:
}
QList<QByteArray> messages;
};
+#endif
// convert to a QByteArray that can be sent to the debug client
QByteArray QV8ProfilerData::toByteArray() const
@@ -90,10 +93,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;
@@ -200,7 +203,8 @@ void QV8ProfilerService::startProfiling(const QString &title)
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);
+ // ### FIXME: v4
+// v8::CpuProfiler::StartProfiling(v8title);
d->m_ongoing.append(title);
@@ -221,6 +225,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 +242,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++) {
@@ -314,6 +326,6 @@ void QV8ProfilerServicePrivate::sendMessages()
q->sendMessages(messages);
}
-
+#endif
QT_END_NAMESPACE
diff --git a/src/qml/qml/ftw/qhashedstring.cpp b/src/qml/qml/ftw/qhashedstring.cpp
index 212a6757d0..8f6c57e029 100644
--- a/src/qml/qml/ftw/qhashedstring.cpp
+++ b/src/qml/qml/ftw/qhashedstring.cpp
@@ -44,14 +44,14 @@
inline quint32 stringHash(const QChar* data, int length)
{
- quint32 rv = calculateHash<quint16>((quint16*)data, length) >> HashedString::kHashShift;
+ quint32 rv = calculateHash((quint16*)data, length);
Q_ASSERT(rv == v8::String::ComputeHash((uint16_t*)data, length));
return rv;
}
inline quint32 stringHash(const char *data, int length)
{
- quint32 rv = calculateHash<quint8>((quint8*)data, length) >> HashedString::kHashShift;
+ quint32 rv = calculateHash((quint8*)data, length);
Q_ASSERT(rv == v8::String::ComputeHash((char *)data, length));
return rv;
}
diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h
index cdf0717e3a..cffa68e4cd 100644
--- a/src/qml/qml/ftw/qhashedstring_p.h
+++ b/src/qml/qml/ftw/qhashedstring_p.h
@@ -56,6 +56,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qstring.h>
#include <private/qv8_p.h>
+#include <private/qv4string.h>
#include <private/qflagpointer_p.h>
diff --git a/src/qml/qml/v8/qv8debug_p.h b/src/qml/qml/v8/qv8debug_p.h
index 6576839e42..87e4e13c7d 100644
--- a/src/qml/qml/v8/qv8debug_p.h
+++ b/src/qml/qml/v8/qv8debug_p.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include <private/v8-debug.h>
+//#include <private/v8-debug.h>
diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h
index 5ae0963178..9f06ee2c56 100644
--- a/src/qml/qml/v8/qv8engine_p.h
+++ b/src/qml/qml/v8/qv8engine_p.h
@@ -208,14 +208,14 @@ public:
QQmlV8Handle &operator=(const QQmlV8Handle &other) { d = other.d; return *this; }
static QQmlV8Handle fromHandle(v8::Handle<v8::Value> h) {
- return QQmlV8Handle(*h);
+ return QQmlV8Handle(h);
}
v8::Handle<v8::Value> toHandle() const {
- return v8::Handle<v8::Value>((v8::Value *)d);
+ return v8::Value::NewFromInternalValue(d);
}
private:
- QQmlV8Handle(void *d) : d(d) {}
- void *d;
+ QQmlV8Handle(v8::Handle<v8::Value> h) : d(h.val) {}
+ quint64 d;
};
class QObject;
diff --git a/src/qml/qml/v8/qv8profiler_p.h b/src/qml/qml/v8/qv8profiler_p.h
index 458532dd7d..39a87f2156 100644
--- a/src/qml/qml/v8/qv8profiler_p.h
+++ b/src/qml/qml/v8/qv8profiler_p.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include <private/v8-profiler.h>
+//#include <private/v8-profiler.h>