aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-09-23 11:15:52 +0200
committerLars Knoll <lars.knoll@qt.io>2018-09-27 08:33:52 +0000
commit1804fea8893c355dbd585e373cb9644387410a92 (patch)
treea1e0a43a74f9137b7bc1c9da0332e6c2e3984cde /src/qml/jsruntime/qv4functionobject.cpp
parent7fb4fc2ac7b56d3f60ceb8ae1175bd4596436cc7 (diff)
Refactor InternalClass::find()
Specialize find() into several methods for different purposes. Prepares for further cleanups and being able to split up getter and setter for accessor properties. Change-Id: Id4ec5509ac1a1361e2170bbfc2347b89b520c782 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 6fc2d45630..cc5f086276 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -149,7 +149,7 @@ void FunctionObject::createDefaultPrototypeProperty(uint protoConstructorSlot)
{
Scope s(this);
- Q_ASSERT(s.engine->internalClasses(EngineBase::Class_ObjectProto)->find(s.engine->id_constructor()->propertyKey()) == protoConstructorSlot);
+ Q_ASSERT(s.engine->internalClasses(EngineBase::Class_ObjectProto)->verifyIndex(s.engine->id_constructor()->propertyKey(), protoConstructorSlot));
ScopedObject proto(s, s.engine->newObject(s.engine->internalClasses(EngineBase::Class_ObjectProto)));
proto->setProperty(protoConstructorSlot, d());
@@ -538,7 +538,7 @@ void Heap::ArrowFunction::init(QV4::ExecutionContext *scope, Function *function,
if (name)
f->setName(name);
- Q_ASSERT(internalClass && internalClass->find(s.engine->id_length()->propertyKey()) == Index_Length);
+ Q_ASSERT(internalClass && internalClass->verifyIndex(s.engine->id_length()->propertyKey(), Index_Length));
setProperty(s.engine, Index_Length, Value::fromInt32(int(function->compiledFunction->length)));
}