mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:17:45 +00:00
LibJS: Add the WeakSet built-in object
This commit is contained in:
parent
ee9fe288b2
commit
8b6beac5ce
10 changed files with 250 additions and 1 deletions
25
Userland/Libraries/LibJS/Runtime/WeakSet.cpp
Normal file
25
Userland/Libraries/LibJS/Runtime/WeakSet.cpp
Normal 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()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue