aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4booleanobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4booleanobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4booleanobject.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp
index d85f4294ce..44188e535c 100644
--- a/src/qml/jsruntime/qv4booleanobject.cpp
+++ b/src/qml/jsruntime/qv4booleanobject.cpp
@@ -53,8 +53,10 @@ BooleanCtor::BooleanCtor(ExecutionContext *scope)
ReturnedValue BooleanCtor::construct(Managed *m, CallData *callData)
{
+ Scope scope(m->engine());
bool n = callData->argc ? callData->args[0].toBoolean() : false;
- return Encode(m->engine()->newBooleanObject(Value::fromBoolean(n)));
+ ScopedValue b(scope, QV4::Value::fromBoolean(n));
+ return Encode(m->engine()->newBooleanObject(b));
}
ReturnedValue BooleanCtor::call(Managed *, CallData *callData)