aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-03 20:26:28 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-04 07:08:19 +0000
commitc0f961cd6b82a523e277f6d8778a20508b15697d (patch)
tree7e4986686630404123a9f40eeb4881a089072d12 /src/qml/jsruntime/qv4object.cpp
parentb46b2e28b39443f6250c0d751a593b35af1c8c1e (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 <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 8032c11add..9c1cbf2357 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -108,8 +108,7 @@ ReturnedValue Object::getValue(const Value &thisObject, const Value &v, Property
Scope scope(f->engine());
ScopedCallData callData(scope);
callData->thisObject = thisObject;
- f->call(scope, callData);
- return scope.result.asReturnedValue();
+ return f->call(callData);
}
bool Object::putValue(uint memberIndex, const Value &value)
@@ -128,7 +127,7 @@ bool Object::putValue(uint memberIndex, const Value &value)
ScopedCallData callData(scope, 1);
callData->args[0] = value;
callData->thisObject = this;
- setter->call(scope, callData);
+ setter->call(callData);
return !ic->engine->hasException;
}
goto reject;
@@ -400,14 +399,14 @@ bool Object::hasOwnProperty(uint index) const
return false;
}
-void Object::construct(const Managed *m, Scope &scope, CallData *)
+ReturnedValue Object::construct(const Managed *m, CallData *)
{
- scope.result = static_cast<const Object *>(m)->engine()->throwTypeError();
+ return m->engine()->throwTypeError();
}
-void Object::call(const Managed *m, Scope &scope, CallData *)
+ReturnedValue Object::call(const Managed *m, CallData *)
{
- scope.result = static_cast<const Object *>(m)->engine()->throwTypeError();
+ return m->engine()->throwTypeError();
}
ReturnedValue Object::get(const Managed *m, String *name, bool *hasProperty)
@@ -770,7 +769,7 @@ bool Object::internalPut(String *name, const Value &value)
ScopedCallData callData(scope, 1);
callData->args[0] = value;
callData->thisObject = this;
- setter->call(scope, callData);
+ setter->call(callData);
return !internalClass()->engine->hasException;
}
@@ -844,7 +843,7 @@ bool Object::internalPutIndexed(uint index, const Value &value)
ScopedCallData callData(scope, 1);
callData->args[0] = value;
callData->thisObject = this;
- setter->call(scope, callData);
+ setter->call(callData);
return !internalClass()->engine->hasException;
}