From 3f1d0b27a11a1d560c11057d2a801224d1613d60 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 23 Jul 2014 13:56:43 +0200 Subject: Changed Value to store Managed::Data pointers directly This is a step towards storing direct heap object pointers for the values on the JS stack, to avoid the costly indirection for data access. Change-Id: Ibb57ed6cf52a7088bbc95ee04ae3a4cb25b8c045 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4script.cpp') diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index fa4b4b1894..20b0832a96 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -70,7 +70,7 @@ QmlBindingWrapper::Data::Data(ExecutionContext *scope, Function *f, Object *qml) o->defineReadonlyProperty(scope->d()->engine->id_length, Primitive::fromInt32(1)); - o->d()->qmlContext = reinterpret_cast(s.engine->currentContext()->newQmlContext(o, qml)); + o->d()->qmlContext = s.engine->currentContext()->newQmlContext(o, qml)->getPointer(); s.engine->popContext(); } @@ -88,7 +88,7 @@ QmlBindingWrapper::Data::Data(ExecutionContext *scope, Object *qml) o->defineReadonlyProperty(scope->d()->engine->id_length, Primitive::fromInt32(1)); - o->d()->qmlContext = reinterpret_cast(s.engine->currentContext()->newQmlContext(o, qml)); + o->d()->qmlContext = s.engine->currentContext()->newQmlContext(o, qml)->getPointer(); s.engine->popContext(); } -- cgit v1.2.3