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, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp
index 6fb21433d6..86ddebd6c3 100644
--- a/src/qml/jsruntime/qv4booleanobject.cpp
+++ b/src/qml/jsruntime/qv4booleanobject.cpp
@@ -54,13 +54,13 @@ BooleanCtor::BooleanCtor(ExecutionContext *scope)
ReturnedValue BooleanCtor::construct(Managed *m, CallData *callData)
{
bool n = callData->argc ? callData->args[0].toBoolean() : false;
- return Value::fromObject(m->engine()->newBooleanObject(Value::fromBoolean(n))).asReturnedValue();
+ return Encode(m->engine()->newBooleanObject(Value::fromBoolean(n)));
}
ReturnedValue BooleanCtor::call(Managed *, CallData *callData)
{
bool value = callData->argc ? callData->args[0].toBoolean() : 0;
- return Value::fromBoolean(value).asReturnedValue();
+ return Encode(value);
}
void BooleanPrototype::init(ExecutionContext *ctx, const Value &ctor)