diff options
author | Lars Knoll <[email protected]> | 2017-08-03 20:26:28 +0200 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2017-08-04 07:08:19 +0000 |
commit | c0f961cd6b82a523e277f6d8778a20508b15697d (patch) | |
tree | 7e4986686630404123a9f40eeb4881a089072d12 /src/qml/jsruntime/qv4booleanobject.cpp | |
parent | b46b2e28b39443f6250c0d751a593b35af1c8c1e (diff) |
Change function signatures for call/construct back
Change those back again to return a value. This will be required
to avoid creation of Scope objects between JS function calls.
Change-Id: I05cb5cf8fd0c13dcefa60d213ccd5983fab57ea3
Reviewed-by: Erik Verbruggen <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4booleanobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4booleanobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp index c8e9ebb2dd..0ed8471753 100644 --- a/src/qml/jsruntime/qv4booleanobject.cpp +++ b/src/qml/jsruntime/qv4booleanobject.cpp @@ -50,16 +50,16 @@ void Heap::BooleanCtor::init(QV4::ExecutionContext *scope) Heap::FunctionObject::init(scope, QStringLiteral("Boolean")); } -void BooleanCtor::construct(const Managed *, Scope &scope, CallData *callData) +ReturnedValue BooleanCtor::construct(const Managed *that, CallData *callData) { bool n = callData->argc ? callData->args[0].toBoolean() : false; - scope.result = Encode(scope.engine->newBooleanObject(n)); + return Encode(that->engine()->newBooleanObject(n)); } -void BooleanCtor::call(const Managed *, Scope &scope, CallData *callData) +ReturnedValue BooleanCtor::call(const Managed *, CallData *callData) { bool value = callData->argc ? callData->args[0].toBoolean() : 0; - scope.result = Encode(value); + return Encode(value); } void BooleanPrototype::init(ExecutionEngine *engine, Object *ctor) |