From f63d48d474db7e9eff7583f1b8478228b13d3c82 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 23 Sep 2018 12:10:12 +0200 Subject: Differentiate between finding for get and set in InternalClass This is required, so we can get rid of the requirement that getter and setter live next to each other in the member data. Change-Id: I2ed57a171628af4dfecd1836d00e958c6bed9d4f Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4context.cpp') diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 38e233965f..94b1a9fb73 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -295,11 +295,11 @@ ExecutionContext::Error ExecutionContext::setProperty(String *name, const Value Q_FALLTHROUGH(); case Heap::ExecutionContext::Type_GlobalContext: if (ctx->activation) { - uint member = ctx->activation->internalClass->indexOfValueOrGetter(id); - if (member < UINT_MAX) { + auto member = ctx->activation->internalClass->findValueOrSetter(id); + if (member.index < UINT_MAX) { Scope scope(engine); ScopedObject a(scope, ctx->activation); - if (!a->putValue(member, value)) + if (!a->putValue(member.index, member.attrs, value)) return TypeError; return NoError; } -- cgit v1.2.3