aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-11 16:30:29 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-21 13:18:55 +0100
commit47fbcb47771a36ab9fd0a4d5ede7b7504ab1410d (patch)
tree57f058746bcc842e2dda628ab5daa5d3096fae71 /src/qml/jsruntime/qv4value.cpp
parent36662b60b09f636c3623057f8116e862f94ff440 (diff)
Get rid of all uses of Managed::engine()
Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef 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, 6 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp
index d1289bba7f..784628071b 100644
--- a/src/qml/jsruntime/qv4value.cpp
+++ b/src/qml/jsruntime/qv4value.cpp
@@ -88,7 +88,8 @@ double Value::toNumberImpl() const
if (isString())
return RuntimeHelpers::stringToNumber(stringValue()->toQString());
{
- Scope scope(managed()->engine());
+ Q_ASSERT(isObject());
+ Scope scope(objectValue()->engine());
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), NUMBER_HINT));
if (scope.engine->hasException)
return 0;
@@ -123,7 +124,8 @@ QString Value::toQStringNoThrow() const
if (isString())
return stringValue()->toQString();
{
- Scope scope(managed()->engine());
+ Q_ASSERT(isObject());
+ Scope scope(objectValue()->engine());
ScopedValue ex(scope);
bool caughtException = false;
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), STRING_HINT));
@@ -175,7 +177,8 @@ QString Value::toQString() const
if (isString())
return stringValue()->toQString();
{
- Scope scope(managed()->engine());
+ Q_ASSERT(isObject());
+ Scope scope(objectValue()->engine());
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), STRING_HINT));
return prim->toQString();
}