diff options
Diffstat (limited to 'src/qml/jsruntime/qv4booleanobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4booleanobject.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp index d9da7d7754..8047993266 100644 --- a/src/qml/jsruntime/qv4booleanobject.cpp +++ b/src/qml/jsruntime/qv4booleanobject.cpp @@ -45,22 +45,21 @@ using namespace QV4; DEFINE_OBJECT_VTABLE(BooleanCtor); DEFINE_OBJECT_VTABLE(BooleanObject); -Heap::BooleanCtor::BooleanCtor(QV4::ExecutionContext *scope) - : Heap::FunctionObject(scope, QStringLiteral("Boolean")) +void Heap::BooleanCtor::init(QV4::ExecutionContext *scope) { + Heap::FunctionObject::init(scope, QStringLiteral("Boolean")); } -ReturnedValue BooleanCtor::construct(const Managed *m, CallData *callData) +void BooleanCtor::construct(const Managed *, Scope &scope, CallData *callData) { - Scope scope(static_cast<const BooleanCtor *>(m)->engine()); bool n = callData->argc ? callData->args[0].toBoolean() : false; - return Encode(scope.engine->newBooleanObject(n)); + scope.result = Encode(scope.engine->newBooleanObject(n)); } -ReturnedValue BooleanCtor::call(const Managed *, CallData *callData) +void BooleanCtor::call(const Managed *, Scope &scope, CallData *callData) { bool value = callData->argc ? callData->args[0].toBoolean() : 0; - return Encode(value); + scope.result = Encode(value); } void BooleanPrototype::init(ExecutionEngine *engine, Object *ctor) |