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/imports/localstorage/plugin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/imports') diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index fb20a1c457..60c1f89c9b 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -323,7 +323,7 @@ static ReturnedValue qmlsqldatabase_executeSql(const FunctionObject *b, const Va if (query.exec()) { QV4::Scoped rows(scope, QQmlSqlDatabaseWrapper::create(scope.engine)); QV4::ScopedObject p(scope, databaseData(scope.engine)->rowsProto.value()); - rows->setPrototype(p.getPointer()); + rows->setPrototypeUnchecked(p.getPointer()); rows->d()->type = Heap::QQmlSqlDatabaseWrapper::Rows; *rows->d()->database = db; *rows->d()->sqlQuery = query; @@ -397,7 +397,7 @@ static ReturnedValue qmlsqldatabase_changeVersion(const FunctionObject *b, const Scoped w(scope, QQmlSqlDatabaseWrapper::create(scope.engine)); ScopedObject p(scope, databaseData(scope.engine)->queryProto.value()); - w->setPrototype(p.getPointer()); + w->setPrototypeUnchecked(p.getPointer()); w->d()->type = Heap::QQmlSqlDatabaseWrapper::Query; *w->d()->database = db; *w->d()->version = *r->d()->version; @@ -449,7 +449,7 @@ static ReturnedValue qmlsqldatabase_transaction_shared(const FunctionObject *b, Scoped w(scope, QQmlSqlDatabaseWrapper::create(scope.engine)); QV4::ScopedObject p(scope, databaseData(scope.engine)->queryProto.value()); - w->setPrototype(p.getPointer()); + w->setPrototypeUnchecked(p.getPointer()); w->d()->type = Heap::QQmlSqlDatabaseWrapper::Query; *w->d()->database = db; *w->d()->version = *r->d()->version; @@ -773,7 +773,7 @@ void QQuickLocalStorage::openDatabaseSync(QQmlV4Function *args) QV4::Scoped db(scope, QQmlSqlDatabaseWrapper::create(scope.engine)); QV4::ScopedObject p(scope, databaseData(scope.engine)->databaseProto.value()); - db->setPrototype(p.getPointer()); + db->setPrototypeUnchecked(p.getPointer()); *db->d()->database = database; *db->d()->version = version; -- cgit v1.2.3