aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4object.cpp11
-rw-r--r--tests/auto/qml/ecmascripttests/TestExpectations1
2 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index cd9ea66297..c1f6642c9d 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -717,12 +717,13 @@ bool Object::virtualHasProperty(const Managed *m, PropertyKey id)
Scope scope(m->engine());
ScopedObject o(scope, m);
ScopedProperty p(scope);
- while (o) {
- if (o->getOwnProperty(id, p) != Attr_Invalid)
- return true;
- o = o->getPrototypeOf();
- }
+ if (o->getOwnProperty(id, p) != Attr_Invalid)
+ return true;
+
+ o = o->getPrototypeOf();
+ if (o)
+ return o->hasProperty(id);
return false;
}
diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations
index c164691d2b..a8ae606fc4 100644
--- a/tests/auto/qml/ecmascripttests/TestExpectations
+++ b/tests/auto/qml/ecmascripttests/TestExpectations
@@ -328,7 +328,6 @@ built-ins/Promise/resolve/name.js fails
built-ins/Promise/resolve/prop-desc.js fails
built-ins/Promise/resolve/resolve-from-promise-capability.js fails
built-ins/Promise/resolve/resolve-prms-cstm-then.js fails
-built-ins/Proxy/has/call-object-create.js fails
built-ins/Proxy/ownKeys/return-duplicate-entries-throws.js fails
built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws.js fails
built-ins/RegExp/S15.10.2.12_A2_T1.js fails