diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-10 16:06:43 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-11-12 12:13:38 +0100 |
commit | 3e84f76bbc7a3fe0a8428be3cd6340401065ad23 (patch) | |
tree | 88b336fb864b7bdaf6a74f56ad65f7850ca63317 /src/qml/qml/qqmlobjectcreator.cpp | |
parent | f2532fd6112341d247bb2a35d28fa54293004ade (diff) |
Store Heap objects in the qml binding wrapper
Change-Id: I7fae0710d148a2b07ec5f36a7fb96c2b645e564e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 42cac66fbd..dcf5f0cee4 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -267,7 +267,8 @@ bool QQmlObjectCreator::populateDeferredProperties(QObject *instance) QV4::ScopedObject qmlScope(valueScope, QV4::QmlContextWrapper::qmlScope(QV8Engine::get(engine), context, _scopeObject)); QV4::Scoped<QV4::QmlBindingWrapper> qmlBindingWrapper(valueScope, v4->memoryManager->alloc<QV4::QmlBindingWrapper>(v4->rootContext, qmlScope)); - QV4::ExecutionContext *qmlContext = qmlBindingWrapper->context(); + // ### GC + QV4::ExecutionContext *qmlContext = QV4::ScopedContext(valueScope, qmlBindingWrapper->context()).getPointer(); qSwap(_qmlContext, qmlContext); @@ -1177,7 +1178,8 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo QV4::Scope valueScope(v4); QV4::ScopedObject qmlScope(valueScope, QV4::QmlContextWrapper::qmlScope(QV8Engine::get(engine), context, _scopeObject)); QV4::Scoped<QV4::QmlBindingWrapper> qmlBindingWrapper(valueScope, v4->memoryManager->alloc<QV4::QmlBindingWrapper>(v4->rootContext, qmlScope)); - QV4::ExecutionContext *qmlContext = qmlBindingWrapper->context(); + // ### GC + QV4::ExecutionContext *qmlContext = QV4::ScopedContext(valueScope, qmlBindingWrapper->context()).getPointer(); qSwap(_qmlContext, qmlContext); |