diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-13 12:14:09 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-11-21 16:36:24 +0100 |
commit | b943d80dd90dec1a8b7802b826ad89e924cead05 (patch) | |
tree | a7edf71a76757a6dcb623e4929419a57a58a5523 /src/qml/qml/qqmljavascriptexpression.cpp | |
parent | cf7bd35a93f220cb1348f7654df9c6f27b590790 (diff) |
Remove the executioncontext in a few more places where it's not needed
Change-Id: I4c92c7bc9d94d8265e306f45d863fdc080a5e2a6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression.cpp')
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 55fc193abd..6a3e0d4a73 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -76,9 +76,9 @@ void QQmlDelayedError::setErrorObject(QObject *object) m_error.setObject(object); } -void QQmlDelayedError::catchJavaScriptException(QV4::ExecutionContext *context) +void QQmlDelayedError::catchJavaScriptException(QV4::ExecutionEngine *engine) { - m_error = context->engine()->catchExceptionAsQmlError(); + m_error = engine->catchExceptionAsQmlError(); } @@ -147,10 +147,9 @@ QV4::ReturnedValue QQmlJavaScriptExpression::evaluate(QQmlContextData *context, QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine()); QV4::Scope scope(v4); QV4::ScopedValue result(scope, QV4::Primitive::undefinedValue()); - QV4::ExecutionContext *ctx = v4->currentContext(); callData->thisObject = v4->globalObject; if (scopeObject()) { - QV4::ScopedValue value(scope, QV4::QObjectWrapper::wrap(ctx->d()->engine, scopeObject())); + QV4::ScopedValue value(scope, QV4::QObjectWrapper::wrap(v4, scopeObject())); if (value->isObject()) callData->thisObject = value; } @@ -160,7 +159,7 @@ QV4::ReturnedValue QQmlJavaScriptExpression::evaluate(QQmlContextData *context, if (watcher.wasDeleted()) scope.engine->catchException(); // ignore exception else - delayedError()->catchJavaScriptException(ctx); + delayedError()->catchJavaScriptException(scope.engine); if (isUndefined) *isUndefined = true; } else { |