aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4engine.cpp5
-rw-r--r--src/qml/jsruntime/qv4engine_p.h4
-rw-r--r--src/qml/jsruntime/qv4global_p.h2
-rw-r--r--src/qml/jsruntime/qv4setobject.cpp99
-rw-r--r--src/qml/jsruntime/qv4setobject_p.h37
-rw-r--r--src/qml/memory/qv4mm.cpp18
-rw-r--r--src/qml/memory/qv4mm_p.h2
-rw-r--r--tests/auto/qml/ecmascripttests/TestExpectations81
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp1
9 files changed, 152 insertions, 97 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 7087e49b30..c40d6414ff 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -493,6 +493,10 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine)
jsObjects[MapProto] = memoryManager->allocate<MapPrototype>();
static_cast<MapPrototype *>(mapPrototype())->init(this, mapCtor());
+ jsObjects[WeakSet_Ctor] = memoryManager->allocate<WeakSetCtor>(global);
+ jsObjects[WeakSetProto] = memoryManager->allocate<WeakSetPrototype>();
+ static_cast<WeakSetPrototype *>(weakSetPrototype())->init(this, weakSetCtor());
+
jsObjects[Set_Ctor] = memoryManager->allocate<SetCtor>(global);
jsObjects[SetProto] = memoryManager->allocate<SetPrototype>();
static_cast<SetPrototype *>(setPrototype())->init(this, setCtor());
@@ -551,6 +555,7 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine)
globalObject->defineDefaultProperty(QStringLiteral("SharedArrayBuffer"), *sharedArrayBufferCtor());
globalObject->defineDefaultProperty(QStringLiteral("ArrayBuffer"), *arrayBufferCtor());
globalObject->defineDefaultProperty(QStringLiteral("DataView"), *dataViewCtor());
+ globalObject->defineDefaultProperty(QStringLiteral("WeakSet"), *weakSetCtor());
globalObject->defineDefaultProperty(QStringLiteral("Set"), *setCtor());
globalObject->defineDefaultProperty(QStringLiteral("WeakMap"), *weakMapCtor());
globalObject->defineDefaultProperty(QStringLiteral("Map"), *mapCtor());
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 028615abfb..0b5d8663eb 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -165,6 +165,7 @@ public:
SharedArrayBufferProto,
ArrayBufferProto,
DataViewProto,
+ WeakSetProto,
SetProto,
WeakMapProto,
MapProto,
@@ -198,6 +199,7 @@ public:
SharedArrayBuffer_Ctor,
ArrayBuffer_Ctor,
DataView_Ctor,
+ WeakSet_Ctor,
Set_Ctor,
WeakMap_Ctor,
Map_Ctor,
@@ -236,6 +238,7 @@ public:
FunctionObject *sharedArrayBufferCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + SharedArrayBuffer_Ctor); }
FunctionObject *arrayBufferCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + ArrayBuffer_Ctor); }
FunctionObject *dataViewCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + DataView_Ctor); }
+ FunctionObject *weakSetCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + WeakSet_Ctor); }
FunctionObject *setCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + Set_Ctor); }
FunctionObject *weakMapCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + WeakMap_Ctor); }
FunctionObject *mapCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + Map_Ctor); }
@@ -271,6 +274,7 @@ public:
Object *sharedArrayBufferPrototype() const { return reinterpret_cast<Object *>(jsObjects + SharedArrayBufferProto); }
Object *arrayBufferPrototype() const { return reinterpret_cast<Object *>(jsObjects + ArrayBufferProto); }
Object *dataViewPrototype() const { return reinterpret_cast<Object *>(jsObjects + DataViewProto); }
+ Object *weakSetPrototype() const { return reinterpret_cast<Object *>(jsObjects + WeakSetProto); }
Object *setPrototype() const { return reinterpret_cast<Object *>(jsObjects + SetProto); }
Object *weakMapPrototype() const { return reinterpret_cast<Object *>(jsObjects + WeakMapProto); }
Object *mapPrototype() const { return reinterpret_cast<Object *>(jsObjects + MapProto); }
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index 5019d4af3a..f89a4b9909 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -196,6 +196,7 @@ namespace Heap {
struct TypedArray;
struct MapObject;
+ struct SetObject;
template <typename T, size_t> struct Pointer;
}
@@ -245,6 +246,7 @@ struct DataView;
struct TypedArray;
struct MapObject;
+struct SetMapObject;
// ReturnedValue is used to return values from runtime methods
// the type has to be a primitive type (no struct or union), so that the compiler
diff --git a/src/qml/jsruntime/qv4setobject.cpp b/src/qml/jsruntime/qv4setobject.cpp
index a03cc3ddf8..65824926b9 100644
--- a/src/qml/jsruntime/qv4setobject.cpp
+++ b/src/qml/jsruntime/qv4setobject.cpp
@@ -46,17 +46,26 @@
using namespace QV4;
DEFINE_OBJECT_VTABLE(SetCtor);
+DEFINE_OBJECT_VTABLE(WeakSetCtor);
DEFINE_OBJECT_VTABLE(SetObject);
+void Heap::WeakSetCtor::init(QV4::ExecutionContext *scope)
+{
+ Heap::FunctionObject::init(scope, QStringLiteral("WeakSet"));
+}
+
void Heap::SetCtor::init(QV4::ExecutionContext *scope)
{
Heap::FunctionObject::init(scope, QStringLiteral("Set"));
}
-ReturnedValue SetCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)
+ReturnedValue WeakSetCtor::construct(const FunctionObject *f, const Value *argv, int argc, const Value *, bool isWeak)
{
Scope scope(f);
Scoped<SetObject> a(scope, scope.engine->memoryManager->allocate<SetObject>());
+ if (isWeak)
+ a->setPrototypeOf(scope.engine->weakSetPrototype());
+ a->d()->isWeakSet = isWeak;
if (argc > 0) {
ScopedValue iterable(scope, argv[0]);
@@ -89,12 +98,74 @@ ReturnedValue SetCtor::virtualCallAsConstructor(const FunctionObject *f, const V
return a.asReturnedValue();
}
-ReturnedValue SetCtor::virtualCall(const FunctionObject *f, const Value *, const Value *, int)
+ReturnedValue WeakSetCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *newTarget)
+{
+ return construct(f, argv, argc, newTarget, true);
+}
+
+ReturnedValue WeakSetCtor::virtualCall(const FunctionObject *f, const Value *, const Value *, int)
{
Scope scope(f);
return scope.engine->throwTypeError(QString::fromLatin1("Set requires new"));
}
+ReturnedValue SetCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *newTarget)
+{
+ return construct(f, argv, argc, newTarget, false);
+}
+
+void WeakSetPrototype::init(ExecutionEngine *engine, Object *ctor)
+{
+ Scope scope(engine);
+ ScopedObject o(scope);
+ ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(0));
+ ctor->defineReadonlyProperty(engine->id_prototype(), (o = this));
+ defineDefaultProperty(engine->id_constructor(), (o = ctor));
+
+ defineDefaultProperty(QStringLiteral("add"), method_add, 1);
+ defineDefaultProperty(QStringLiteral("delete"), method_delete, 1);
+ defineDefaultProperty(QStringLiteral("has"), method_has, 1);
+
+ ScopedString val(scope, engine->newString(QLatin1String("WeakSet")));
+ defineReadonlyConfigurableProperty(engine->symbol_toStringTag(), val);
+}
+
+ReturnedValue WeakSetPrototype::method_add(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
+{
+ Scope scope(b);
+ Scoped<SetObject> that(scope, thisObject);
+ if ((!that || !that->d()->isWeakSet) ||
+ (!argc || !argv[0].isObject()))
+ return scope.engine->throwTypeError();
+
+ that->d()->esTable->set(argv[0], Primitive::undefinedValue());
+ return that.asReturnedValue();
+}
+
+ReturnedValue WeakSetPrototype::method_delete(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
+{
+ Scope scope(b);
+ Scoped<SetObject> that(scope, thisObject);
+ if (!that || !that->d()->isWeakSet)
+ return scope.engine->throwTypeError();
+ if (!argc || !argv[0].isObject())
+ return Encode(false);
+
+ return Encode(that->d()->esTable->remove(argv[0]));
+}
+
+ReturnedValue WeakSetPrototype::method_has(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
+{
+ Scope scope(b);
+ Scoped<SetObject> that(scope, thisObject);
+ if (!that || !that->d()->isWeakSet)
+ return scope.engine->throwTypeError();
+ if (!argc || !argv[0].isObject())
+ return Encode(false);
+
+ return Encode(that->d()->esTable->has(argv[0]));
+}
+
void SetPrototype::init(ExecutionEngine *engine, Object *ctor)
{
Scope scope(engine);
@@ -136,10 +207,15 @@ void Heap::SetObject::destroy()
esTable = 0;
}
+void Heap::SetObject::removeUnmarkedKeys()
+{
+ esTable->removeUnmarkedKeys();
+}
+
void Heap::SetObject::markObjects(Heap::Base *that, MarkStack *markStack)
{
SetObject *s = static_cast<SetObject *>(that);
- s->esTable->markObjects(markStack, false);
+ s->esTable->markObjects(markStack, s->isWeakSet);
Object::markObjects(that, markStack);
}
@@ -147,7 +223,7 @@ ReturnedValue SetPrototype::method_add(const FunctionObject *b, const Value *thi
{
Scope scope(b);
Scoped<SetObject> that(scope, thisObject);
- if (!that)
+ if (!that || that->d()->isWeakSet)
return scope.engine->throwTypeError();
that->d()->esTable->set(argv[0], Primitive::undefinedValue());
@@ -158,7 +234,7 @@ ReturnedValue SetPrototype::method_clear(const FunctionObject *b, const Value *t
{
Scope scope(b);
Scoped<SetObject> that(scope, thisObject);
- if (!that)
+ if (!that || that->d()->isWeakSet)
return scope.engine->throwTypeError();
that->d()->esTable->clear();
@@ -169,7 +245,7 @@ ReturnedValue SetPrototype::method_delete(const FunctionObject *b, const Value *
{
Scope scope(b);
Scoped<SetObject> that(scope, thisObject);
- if (!that)
+ if (!that || that->d()->isWeakSet)
return scope.engine->throwTypeError();
return Encode(that->d()->esTable->remove(argv[0]));
@@ -179,7 +255,7 @@ ReturnedValue SetPrototype::method_entries(const FunctionObject *b, const Value
{
Scope scope(b);
Scoped<SetObject> that(scope, thisObject);
- if (!that)
+ if (!that || that->d()->isWeakSet)
return scope.engine->throwTypeError();
Scoped<SetIteratorObject> ao(scope, scope.engine->newSetIteratorObject(that));
@@ -191,7 +267,7 @@ ReturnedValue SetPrototype::method_forEach(const FunctionObject *b, const Value
{
Scope scope(b);
Scoped<SetObject> that(scope, thisObject);
- if (!that)
+ if (!that || that->d()->isWeakSet)
return scope.engine->throwTypeError();
ScopedFunctionObject callbackfn(scope, argv[0]);
@@ -218,7 +294,7 @@ ReturnedValue SetPrototype::method_has(const FunctionObject *b, const Value *thi
{
Scope scope(b);
Scoped<SetObject> that(scope, thisObject);
- if (!that)
+ if (!that || that->d()->isWeakSet)
return scope.engine->throwTypeError();
return Encode(that->d()->esTable->has(argv[0]));
@@ -228,7 +304,7 @@ ReturnedValue SetPrototype::method_get_size(const FunctionObject *b, const Value
{
Scope scope(b);
Scoped<SetObject> that(scope, thisObject);
- if (!that)
+ if (!that || that->d()->isWeakSet)
return scope.engine->throwTypeError();
return Encode(that->d()->esTable->size());
@@ -238,11 +314,10 @@ ReturnedValue SetPrototype::method_values(const FunctionObject *b, const Value *
{
Scope scope(b);
Scoped<SetObject> that(scope, thisObject);
- if (!that)
+ if (!that || that->d()->isWeakSet)
return scope.engine->throwTypeError();
Scoped<SetIteratorObject> ao(scope, scope.engine->newSetIteratorObject(that));
ao->d()->iterationKind = IteratorKind::ValueIteratorKind;
return ao->asReturnedValue();
}
-
diff --git a/src/qml/jsruntime/qv4setobject_p.h b/src/qml/jsruntime/qv4setobject_p.h
index 34649c3f01..21584e2132 100644
--- a/src/qml/jsruntime/qv4setobject_p.h
+++ b/src/qml/jsruntime/qv4setobject_p.h
@@ -64,7 +64,12 @@ class ESTable;
namespace Heap {
-struct SetCtor : FunctionObject {
+struct WeakSetCtor : FunctionObject {
+ void init(QV4::ExecutionContext *scope);
+};
+
+
+struct SetCtor : WeakSetCtor {
void init(QV4::ExecutionContext *scope);
};
@@ -72,19 +77,33 @@ struct SetObject : Object {
static void markObjects(Heap::Base *that, MarkStack *markStack);
void init();
void destroy();
+ void removeUnmarkedKeys();
+
ESTable *esTable;
+ SetObject *nextWeakSet;
+ bool isWeakSet;
};
}
-struct SetCtor: FunctionObject
+
+struct WeakSetCtor: FunctionObject
{
- V4_OBJECT2(SetCtor, FunctionObject)
+ V4_OBJECT2(WeakSetCtor, FunctionObject)
+
+ static ReturnedValue construct(const FunctionObject *f, const Value *argv, int argc, const Value *, bool weakSet);
static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *);
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc);
};
+struct SetCtor : WeakSetCtor
+{
+ V4_OBJECT2(SetCtor, WeakSetCtor)
+
+ static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *);
+};
+
struct SetObject : Object
{
V4_OBJECT2(SetObject, Object)
@@ -92,7 +111,17 @@ struct SetObject : Object
V4_NEEDS_DESTROY
};
-struct SetPrototype : Object
+struct WeakSetPrototype : Object
+{
+ void init(ExecutionEngine *engine, Object *ctor);
+
+ static ReturnedValue method_add(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
+ static ReturnedValue method_delete(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
+ static ReturnedValue method_has(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
+};
+
+
+struct SetPrototype : WeakSetPrototype
{
void init(ExecutionEngine *engine, Object *ctor);
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index 065204b5d3..b9e6327ea2 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -62,6 +62,7 @@
#include "qv4alloca_p.h"
#include "qv4profiling_p.h"
#include "qv4mapobject_p.h"
+#include "qv4setobject_p.h"
//#define MM_STATS
@@ -989,6 +990,17 @@ void MemoryManager::sweep(bool lastSweep, ClassDestroyStatsCallback classCountPt
map = map->nextWeakMap;
}
+ Heap::SetObject *set = weakSets;
+ Heap::SetObject **lastSet = &weakSets;
+ while (set) {
+ if (set->isMarked()) {
+ set->removeUnmarkedKeys();
+ *lastSet = set;
+ lastSet = &set->nextWeakSet;
+ }
+ set = set->nextWeakSet;
+ }
+
// onDestruction handlers may have accessed other QObject wrappers and reset their value, so ensure
// that they are all set to undefined.
for (PersistentValueStorage::Iterator it = m_weakValues->begin(); it != m_weakValues->end(); ++it) {
@@ -1198,6 +1210,12 @@ void MemoryManager::registerWeakMap(Heap::MapObject *map)
weakMaps = map;
}
+void MemoryManager::registerWeakSet(Heap::SetObject *set)
+{
+ set->nextWeakSet = weakSets;
+ weakSets = set;
+}
+
MemoryManager::~MemoryManager()
{
delete m_persistentValues;
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h
index da162d2dfe..bbbbb1aef6 100644
--- a/src/qml/memory/qv4mm_p.h
+++ b/src/qml/memory/qv4mm_p.h
@@ -275,6 +275,7 @@ public:
}
void registerWeakMap(Heap::MapObject *map);
+ void registerWeakSet(Heap::SetObject *set);
protected:
/// expects size to be aligned
@@ -299,6 +300,7 @@ public:
PersistentValueStorage *m_weakValues;
QVector<Value *> m_pendingFreedObjectWrapperValue;
Heap::MapObject *weakMaps = nullptr;
+ Heap::SetObject *weakSets = nullptr;
std::size_t unmanagedHeapSize = 0; // the amount of bytes of heap that is not managed by the memory manager, but which is held onto by managed items.
std::size_t unmanagedHeapSizeGCLimit;
diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations
index 7fd3178ffc..c9eb122fb2 100644
--- a/tests/auto/qml/ecmascripttests/TestExpectations
+++ b/tests/auto/qml/ecmascripttests/TestExpectations
@@ -478,14 +478,8 @@ built-ins/RegExp/unicode_restricted_octal_escape.js fails
built-ins/RegExp/unicode_restricted_quantifiable_assertion.js fails
built-ins/RegExp/u180e.js fails
built-ins/Set/proto-from-ctor-realm.js fails
-built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-weakset.js fails
-built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-weakset.js fails
-built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-weakset.js fails
-built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-weakset.js fails
-built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-weakset.js fails
built-ins/Set/prototype/forEach/iterates-values-revisits-after-delete-re-add.js fails
built-ins/Set/prototype/forEach/this-arg-explicit-cannot-override-lexical-this-arrow.js fails
-built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-weakset.js fails
built-ins/SharedArrayBuffer/data-allocation-after-object-creation.js fails
built-ins/SharedArrayBuffer/proto-from-ctor-realm.js fails
built-ins/SharedArrayBuffer/prototype-from-newtarget.js fails
@@ -656,81 +650,7 @@ built-ins/WeakMap/proto-from-ctor-realm.js fails
built-ins/WeakMap/prototype/delete/delete-entry-initial-iterable.js fails
built-ins/WeakMap/prototype/get/returns-value.js fails
built-ins/WeakMap/set-not-callable-throws.js fails
-built-ins/WeakSet/add-not-callable-throws.js fails
-built-ins/WeakSet/constructor.js fails
-built-ins/WeakSet/empty-iterable.js fails
-built-ins/WeakSet/get-add-method-failure.js fails
-built-ins/WeakSet/iterable-failure.js fails
-built-ins/WeakSet/iterable.js fails
-built-ins/WeakSet/iterator-close-after-add-failure.js fails
-built-ins/WeakSet/iterator-next-failure.js fails
-built-ins/WeakSet/iterator-value-failure.js fails
-built-ins/WeakSet/length.js fails
-built-ins/WeakSet/name.js fails
-built-ins/WeakSet/no-iterable.js fails
-built-ins/WeakSet/properties-of-the-weakset-prototype-object.js fails
built-ins/WeakSet/proto-from-ctor-realm.js fails
-built-ins/WeakSet/prototype-of-weakset.js fails
-built-ins/WeakSet/prototype/Symbol.toStringTag.js fails
-built-ins/WeakSet/prototype/add/add.js fails
-built-ins/WeakSet/prototype/add/adds-element.js fails
-built-ins/WeakSet/prototype/add/does-not-have-weaksetdata-internal-slot-array.js fails
-built-ins/WeakSet/prototype/add/does-not-have-weaksetdata-internal-slot-map.js fails
-built-ins/WeakSet/prototype/add/does-not-have-weaksetdata-internal-slot-object.js fails
-built-ins/WeakSet/prototype/add/does-not-have-weaksetdata-internal-slot-set.js fails
-built-ins/WeakSet/prototype/add/does-not-have-weaksetdata-internal-slot-weakset-prototype.js fails
-built-ins/WeakSet/prototype/add/length.js fails
-built-ins/WeakSet/prototype/add/name.js fails
-built-ins/WeakSet/prototype/add/returns-this-when-ignoring-duplicate.js fails
-built-ins/WeakSet/prototype/add/returns-this.js fails
-built-ins/WeakSet/prototype/add/this-not-object-throw-boolean.js fails
-built-ins/WeakSet/prototype/add/this-not-object-throw-null.js fails
-built-ins/WeakSet/prototype/add/this-not-object-throw-number.js fails
-built-ins/WeakSet/prototype/add/this-not-object-throw-string.js fails
-built-ins/WeakSet/prototype/add/this-not-object-throw-symbol.js fails
-built-ins/WeakSet/prototype/add/this-not-object-throw-undefined.js fails
-built-ins/WeakSet/prototype/add/value-not-object-throw.js fails
-built-ins/WeakSet/prototype/constructor/weakset-prototype-constructor-intrinsic.js fails
-built-ins/WeakSet/prototype/constructor/weakset-prototype-constructor.js fails
-built-ins/WeakSet/prototype/delete/delete-entry-initial-iterable.js fails
-built-ins/WeakSet/prototype/delete/delete-entry.js fails
-built-ins/WeakSet/prototype/delete/delete.js fails
-built-ins/WeakSet/prototype/delete/does-not-have-weaksetdata-internal-slot-array.js fails
-built-ins/WeakSet/prototype/delete/does-not-have-weaksetdata-internal-slot-map.js fails
-built-ins/WeakSet/prototype/delete/does-not-have-weaksetdata-internal-slot-object.js fails
-built-ins/WeakSet/prototype/delete/does-not-have-weaksetdata-internal-slot-set.js fails
-built-ins/WeakSet/prototype/delete/does-not-have-weaksetdata-internal-slot-weakset-prototype.js fails
-built-ins/WeakSet/prototype/delete/length.js fails
-built-ins/WeakSet/prototype/delete/name.js fails
-built-ins/WeakSet/prototype/delete/returns-false-value-is-not-object.js fails
-built-ins/WeakSet/prototype/delete/returns-false-when-delete-is-noop.js fails
-built-ins/WeakSet/prototype/delete/this-not-object-throw-boolean.js fails
-built-ins/WeakSet/prototype/delete/this-not-object-throw-null.js fails
-built-ins/WeakSet/prototype/delete/this-not-object-throw-number.js fails
-built-ins/WeakSet/prototype/delete/this-not-object-throw-string.js fails
-built-ins/WeakSet/prototype/delete/this-not-object-throw-symbol.js fails
-built-ins/WeakSet/prototype/delete/this-not-object-throw-undefined.js fails
-built-ins/WeakSet/prototype/has/does-not-have-weaksetdata-internal-slot-array.js fails
-built-ins/WeakSet/prototype/has/does-not-have-weaksetdata-internal-slot-map.js fails
-built-ins/WeakSet/prototype/has/does-not-have-weaksetdata-internal-slot-object.js fails
-built-ins/WeakSet/prototype/has/does-not-have-weaksetdata-internal-slot-set.js fails
-built-ins/WeakSet/prototype/has/does-not-have-weaksetdata-internal-slot-weakset-prototype.js fails
-built-ins/WeakSet/prototype/has/has.js fails
-built-ins/WeakSet/prototype/has/length.js fails
-built-ins/WeakSet/prototype/has/name.js fails
-built-ins/WeakSet/prototype/has/returns-false-when-value-is-not-object.js fails
-built-ins/WeakSet/prototype/has/returns-false-when-value-not-present.js fails
-built-ins/WeakSet/prototype/has/returns-true-when-value-present.js fails
-built-ins/WeakSet/prototype/has/this-not-object-throw-boolean.js fails
-built-ins/WeakSet/prototype/has/this-not-object-throw-null.js fails
-built-ins/WeakSet/prototype/has/this-not-object-throw-number.js fails
-built-ins/WeakSet/prototype/has/this-not-object-throw-string.js fails
-built-ins/WeakSet/prototype/has/this-not-object-throw-symbol.js fails
-built-ins/WeakSet/prototype/has/this-not-object-throw-undefined.js fails
-built-ins/WeakSet/prototype/prototype-attributes.js fails
-built-ins/WeakSet/symbol-disallowed-as-weakset-key.js fails
-built-ins/WeakSet/undefined-newtarget.js fails
-built-ins/WeakSet/weakset.js fails
built-ins/global/global-object.js fails
built-ins/global/property-descriptor.js fails
built-ins/isFinite/toprimitive-not-callable-throws.js fails
@@ -1237,7 +1157,6 @@ language/statements/class/subclass/builtin-objects/Set/super-must-be-called.js f
language/statements/class/subclass/builtin-objects/String/super-must-be-called.js fails
language/statements/class/subclass/builtin-objects/TypedArray/super-must-be-called.js fails
language/statements/class/subclass/builtin-objects/WeakMap/super-must-be-called.js fails
-language/statements/class/subclass/builtin-objects/WeakSet/regular-subclassing.js fails
language/statements/class/subclass/builtin-objects/WeakSet/super-must-be-called.js fails
language/statements/class/subclass/builtins.js fails
language/statements/class/subclass/class-definition-null-proto-super.js fails
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 191bd7fca0..f08d9a4798 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -978,6 +978,7 @@ void tst_QJSEngine::globalObjectProperties_enumerate()
<< "Uint32Array"
<< "Float32Array"
<< "Float64Array"
+ << "WeakSet"
<< "Set"
<< "WeakMap"
<< "Map"