diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-05-03 19:11:53 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-18 05:48:10 +0000 |
commit | 17a336714dcc16e786a619d68d2901e0e93e86a4 (patch) | |
tree | 1c9216cd7fcb98781a87a877d8af47d813ab617a /src/qml/qml/qqmljavascriptexpression.cpp | |
parent | 7be7651e9d6699981ed13643eff0aa43ca1bed4e (diff) |
Don't store the qmlscope object in a persistent
This doesn't make sense, as the persistent is never being
used. So either the scope object is being used from somewhere
else in which case it'll be referenced and marked from there,
or it's not being used in which case, we might as well collect it.
Change-Id: I56cb45282cbc795d4c59314c10491dedb9b7d478
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression.cpp')
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index cc57d855c3..60378a26e7 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -313,8 +313,7 @@ QQmlDelayedError *QQmlJavaScriptExpression::delayedError() QV4::ReturnedValue QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scopeObject, - const QString &code, const QString &filename, quint16 line, - QV4::PersistentValue *qmlscope) + const QString &code, const QString &filename, quint16 line) { QQmlEngine *engine = ctxt->engine; QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); @@ -340,14 +339,11 @@ QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scopeObje ep->warning(error); return QV4::Encode::undefined(); } - if (qmlscope) - qmlscope->set(v4, qmlScopeObject); return result->asReturnedValue(); } QV4::ReturnedValue QQmlJavaScriptExpression::qmlBinding(QQmlContextData *ctxt, QObject *qmlScope, - const QString &code, const QString &filename, quint16 line, - QV4::PersistentValue *qmlscope) + const QString &code, const QString &filename, quint16 line) { QQmlEngine *engine = ctxt->engine; QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine); @@ -373,8 +369,6 @@ QV4::ReturnedValue QQmlJavaScriptExpression::qmlBinding(QQmlContextData *ctxt, Q ep->warning(error); return QV4::Encode::undefined(); } - if (qmlscope) - qmlscope->set(v4, qmlScopeObject); return result->asReturnedValue(); } |