mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
LibJS: Generify the garbage collector's weak container notifications
This will allow us to use the same interface for other JS weak containers like the WeakMap & WeakRef.
This commit is contained in:
parent
06fdc26656
commit
1a8ee5d8d7
6 changed files with 51 additions and 17 deletions
|
@ -15,13 +15,12 @@ WeakSet* WeakSet::create(GlobalObject& global_object)
|
|||
|
||||
WeakSet::WeakSet(Object& prototype)
|
||||
: Object(prototype)
|
||||
, WeakContainer(heap())
|
||||
{
|
||||
heap().did_create_weak_set({}, *this);
|
||||
}
|
||||
|
||||
WeakSet::~WeakSet()
|
||||
{
|
||||
heap().did_destroy_weak_set({}, *this);
|
||||
}
|
||||
|
||||
void WeakSet::remove_sweeped_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue