mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:47:45 +00:00
AK+LibJS: Introduce JS::HeapFunction
This change introduces HeapFunction, which is intended to be used as a replacement for SafeFunction. The new type behaves like a regular GC-allocated object, which means it needs to be visited from visit_edges, and unlike SafeFunction, it does not create new roots for captured parameters. Co-Authored-By: Andreas Kling <kling@serenityos.org>
This commit is contained in:
parent
a1ccc4b0cf
commit
469aea5a5b
6 changed files with 183 additions and 42 deletions
|
@ -81,6 +81,9 @@ public:
|
|||
void uproot_cell(Cell* cell);
|
||||
|
||||
private:
|
||||
friend class MarkingVisitor;
|
||||
friend class GraphConstructorVisitor;
|
||||
|
||||
static bool cell_must_survive_garbage_collection(Cell const&);
|
||||
|
||||
Cell* allocate_cell(size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue