1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:47:35 +00:00

LibJS: Always allocate ExecutionContext objects on the malloc heap

Instead of allocating these in a mixture of ways, we now always put
them on the malloc heap, and keep an intrusive linked list of them
that we can iterate for GC marking purposes.
This commit is contained in:
Andreas Kling 2023-11-27 16:45:45 +01:00
parent 845da3901d
commit 3dc5f467a8
38 changed files with 251 additions and 217 deletions

View file

@ -42,7 +42,7 @@ ThrowCompletionOr<NonnullOwnPtr<ExecutionContext>> Realm::initialize_host_define
auto realm = MUST_OR_THROW_OOM(Realm::create(vm));
// 2. Let newContext be a new execution context.
auto new_context = make<ExecutionContext>(vm.heap());
auto new_context = ExecutionContext::create(vm.heap());
// 3. Set the Function of newContext to null.
new_context->function = nullptr;