From 1596112e146b28541bcee412ed159cdea7e692d0 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 19 Jun 2018 13:28:26 +0200 Subject: Add Proxy support for prototype handling Cleanup get/setPrototypeOf and fix some smaller incompatibilities in the default implementation for Object. Add the methods to the vtable and reimplement them according to spec for ProxyObjects. Clean up the Object.prototype.get/setPrototypeOf/__proto__ methods and fix a smaller bug in the Reflect API for those methods. Change-Id: I6e438753332ec4db963d6cdcf86f340ff212777a Reviewed-by: Simon Hausmann --- src/qml/util/qqmladaptormodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/util') diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index 3016316e57..4130eff33a 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -439,7 +439,7 @@ public: QV4::Scope scope(v4); QV4::ScopedObject proto(scope, type->prototype.value()); QV4::ScopedObject o(scope, proto->engine()->memoryManager->allocate(this)); - o->setPrototype(proto); + o->setPrototypeOf(proto); ++scriptRef; return o.asReturnedValue(); } @@ -620,7 +620,7 @@ public: QV4::Scope scope(v4); QV4::ScopedObject o(scope, v4->memoryManager->allocate(this)); QV4::ScopedObject p(scope, data->listItemProto.value()); - o->setPrototype(p); + o->setPrototypeOf(p); ++scriptRef; return o.asReturnedValue(); } -- cgit v1.2.3