Simplify __qmljs_call_property_lookup
authorLars Knoll <lars.knoll@digia.com>
Fri, 16 Aug 2013 20:08:31 +0000 (22:08 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 17 Aug 2013 07:26:48 +0000 (09:26 +0200)
This was still using the older (and slower) member of Lookup. Instead
call the function pointer to resolve the lookup.

Change-Id: I840b063ce4cc71f71be9be23ea7ce164887c2a91
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/qv4runtime.cpp

index 79bbbf6..5dd4ef2 100644 (file)
@@ -824,11 +824,8 @@ void __qmljs_call_property_lookup(ExecutionContext *context, Value *result, cons
     else
         baseObject = __qmljs_convert_to_object(context, thisObject);
 
-    PropertyAttributes attrs;
-    Property *p = l->lookup(baseObject, &attrs);
-    if (!p)
-        context->throwTypeError();
-    Value func = attrs.isData() ? p->value : baseObject->getValue(p, attrs);
+    Value func;
+    l->getter(l, &func, Value::fromObject(baseObject));
     FunctionObject *o = func.asFunctionObject();
     if (!o)
         context->throwTypeError();