aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4proxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4proxy.cpp')
-rw-r--r--src/qml/jsruntime/qv4proxy.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4proxy.cpp b/src/qml/jsruntime/qv4proxy.cpp
index 895763d40e..a1138c2515 100644
--- a/src/qml/jsruntime/qv4proxy.cpp
+++ b/src/qml/jsruntime/qv4proxy.cpp
@@ -546,7 +546,7 @@ static bool removeAllOccurrences(ArrayObject *target, ReturnedValue val) {
return found;
}
-OwnPropertyKeyIterator *ProxyObject::virtualOwnPropertyKeys(const Object *m)
+OwnPropertyKeyIterator *ProxyObject::virtualOwnPropertyKeys(const Object *m, Value *iteratorTarget)
{
Scope scope(m);
const ProxyObject *o = static_cast<const ProxyObject *>(m);
@@ -564,7 +564,7 @@ OwnPropertyKeyIterator *ProxyObject::virtualOwnPropertyKeys(const Object *m)
if (scope.hasException())
return nullptr;
if (trap->isUndefined())
- return target->ownPropertyKeys();
+ return target->ownPropertyKeys(iteratorTarget);
if (!trap->isFunctionObject()) {
scope.engine->throwTypeError();
return nullptr;
@@ -637,12 +637,13 @@ OwnPropertyKeyIterator *ProxyObject::virtualOwnPropertyKeys(const Object *m)
len = uncheckedResultKeys->getLength();
for (uint i = 0; i < len; ++i) {
- if (targetConfigurableKeys->get(i) != Encode::undefined()) {
+ if (uncheckedResultKeys->get(i) != Encode::undefined()) {
scope.engine->throwTypeError();
return nullptr;
}
}
+ *iteratorTarget = *m;
return new ProxyObjectOwnPropertyKeyIterator(trapKeys);
}