diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-11 13:55:01 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:13:18 +0200 |
commit | 1a2a83f80ba4ecc28eba72af57c81bd43a45946c (patch) | |
tree | c2e4eb4d9bb57873ca340f6bbbf2342b36c91452 /src/qml/qml/qqmljavascriptexpression.cpp | |
parent | 826550af450b39f47a3c00ec316acf1e317f12c6 (diff) |
Use a ReturnedValue for Managed::call()
Change-Id: Ief2d75e9789dd367c603d90dc0fe5316a0d055e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression.cpp')
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index c86309027f..7e726ab96e 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -162,8 +162,9 @@ QQmlJavaScriptExpression::evaluate(QQmlContextData *context, // incase we have been deleted. DeleteWatcher watcher(this); - QV4::Value result = QV4::Value::undefinedValue(); QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine()); + QV4::ValueScope scope(v4); + QV4::ScopedValue result(scope, QV4::Value::undefinedValue()); QV4::ExecutionContext *ctx = v4->current; try { QV4::Value This = ep->v8engine()->global(); @@ -179,7 +180,7 @@ QQmlJavaScriptExpression::evaluate(QQmlContextData *context, result = function.asFunctionObject()->call(callData); if (isUndefined) - *isUndefined = result.isUndefined(); + *isUndefined = result->isUndefined(); if (!watcher.wasDeleted() && hasDelayedError()) delayedError()->clearError(); |