aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsengine/qjsengine.pro
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-22 22:30:14 +0100
committerQt by Nokia <qt-info@nokia.com>2012-05-29 09:00:57 +0200
commit6318f91dc0bf1ac428037c963b80b7a5d4e1ad30 (patch)
tree4b307f601d25d9f6c6aee65fbf754893c1fc6a79 /tests/auto/qml/qjsengine/qjsengine.pro
parent18eba786347c42e0c1c9a2a5f8331624f1779920 (diff)
Add internal API for accessing V8 handles of QJS types
Make it possible to use the V8 API directly. This might be necessary in cases where the QJS API is missing some functionality (e.g., controlling the V8 profiler), or for performance reasons (e.g., avoiding overhead of QJSValue indirection). The V8 API is clearly more extensive than the QJS API, and QJS will likely never reach feature parity with it (since that's outside the scope of QJS). By providing access to the underlying V8 types, users can still choose to use V8 directly in the (hopefully rare) cases where the public QJS API isn't sufficient. Two new functions are introduced: - qt_QJSEngineV8Context(QJSEngine *) returns a local handle to the engine's internal V8 context. - qt_QJSValueV8Value(const QJSValue &) returns a local handle to the QJSValue's internal V8 value. The caller is responsible for - ensuring that a V8 handle scope is in place; - entering/exiting the QJSEngine's V8 context. The documentation and tests show how that can be done. Also added a benchmark for QJSValue that can be used to measure the effect of using raw V8 API for some common operations. Change-Id: I680aeb2f67ffe5eeadd432a05c8084e43921a118 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/qml/qjsengine/qjsengine.pro')
-rw-r--r--tests/auto/qml/qjsengine/qjsengine.pro2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qjsengine/qjsengine.pro b/tests/auto/qml/qjsengine/qjsengine.pro
index 49338e7d2c..f3d37bc183 100644
--- a/tests/auto/qml/qjsengine/qjsengine.pro
+++ b/tests/auto/qml/qjsengine/qjsengine.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qjsengine
-QT += qml widgets testlib
+QT += v8-private qml widgets testlib
macx:CONFIG -= app_bundle
SOURCES += tst_qjsengine.cpp