LibJS: Add the WeakSet built-in object

This commit is contained in:
Idan Horowitz 2021-06-09 19:23:04 +03:00 committed by Linus Groh
commit 8b6beac5ce
Notes: sideshowbarker 2024-07-18 12:30:55 +09:00
10 changed files with 250 additions and 1 deletions

View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/WeakSet.h>
namespace JS {
WeakSet* WeakSet::create(GlobalObject& global_object)
{
return global_object.heap().allocate<WeakSet>(global_object, *global_object.weak_set_prototype());
}
WeakSet::WeakSet(Object& prototype)
: Object(prototype)
{
}
WeakSet::~WeakSet()
{
}
}