aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-13 12:14:09 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-21 16:36:24 +0100
commitb943d80dd90dec1a8b7802b826ad89e924cead05 (patch)
treea7edf71a76757a6dcb623e4929419a57a58a5523 /src/qml/jsruntime/qv4value.cpp
parentcf7bd35a93f220cb1348f7654df9c6f27b590790 (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/jsruntime/qv4value.cpp')
-rw-r--r--src/qml/jsruntime/qv4value.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp
index cd44d93f42..d1289bba7f 100644
--- a/src/qml/jsruntime/qv4value.cpp
+++ b/src/qml/jsruntime/qv4value.cpp
@@ -88,8 +88,7 @@ double Value::toNumberImpl() const
if (isString())
return RuntimeHelpers::stringToNumber(stringValue()->toQString());
{
- ExecutionContext *ctx = objectValue()->internalClass()->engine->currentContext();
- Scope scope(ctx);
+ Scope scope(managed()->engine());
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), NUMBER_HINT));
if (scope.engine->hasException)
return 0;
@@ -124,8 +123,7 @@ QString Value::toQStringNoThrow() const
if (isString())
return stringValue()->toQString();
{
- ExecutionContext *ctx = objectValue()->internalClass()->engine->currentContext();
- Scope scope(ctx);
+ Scope scope(managed()->engine());
ScopedValue ex(scope);
bool caughtException = false;
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), STRING_HINT));
@@ -177,8 +175,7 @@ QString Value::toQString() const
if (isString())
return stringValue()->toQString();
{
- ExecutionContext *ctx = objectValue()->internalClass()->engine->currentContext();
- Scope scope(ctx);
+ Scope scope(managed()->engine());
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), STRING_HINT));
return prim->toQString();
}