mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -90,7 +90,7 @@ PromiseJob create_promise_reaction_job(VM& vm, PromiseReaction& reaction, Value
|
|||
{
|
||||
// 1. Let job be a new Job Abstract Closure with no parameters that captures reaction and argument and performs the following steps when called:
|
||||
// See run_reaction_job for "the following steps".
|
||||
auto job = create_heap_function(vm.heap(), [&vm, &reaction, argument] {
|
||||
auto job = GC::create_function(vm.heap(), [&vm, &reaction, argument] {
|
||||
return run_reaction_job(vm, reaction, argument);
|
||||
});
|
||||
|
||||
|
@ -144,7 +144,7 @@ static ThrowCompletionOr<Value> run_resolve_thenable_job(VM& vm, Promise& promis
|
|||
}
|
||||
|
||||
// 27.2.2.2 NewPromiseResolveThenableJob ( promiseToResolve, thenable, then ), https://tc39.es/ecma262/#sec-newpromiseresolvethenablejob
|
||||
PromiseJob create_promise_resolve_thenable_job(VM& vm, Promise& promise_to_resolve, Value thenable, JS::NonnullGCPtr<JobCallback> then)
|
||||
PromiseJob create_promise_resolve_thenable_job(VM& vm, Promise& promise_to_resolve, Value thenable, GC::Ref<JobCallback> then)
|
||||
{
|
||||
// 2. Let getThenRealmResult be Completion(GetFunctionRealm(then.[[Callback]])).
|
||||
auto get_then_realm_result = get_function_realm(vm, then->callback());
|
||||
|
@ -164,7 +164,7 @@ PromiseJob create_promise_resolve_thenable_job(VM& vm, Promise& promise_to_resol
|
|||
|
||||
// 1. Let job be a new Job Abstract Closure with no parameters that captures promiseToResolve, thenable, and then and performs the following steps when called:
|
||||
// See run_resolve_thenable_job() for "the following steps".
|
||||
auto job = create_heap_function(vm.heap(), [&vm, &promise_to_resolve, thenable, then]() mutable {
|
||||
auto job = GC::create_function(vm.heap(), [&vm, &promise_to_resolve, thenable, then]() mutable {
|
||||
return run_resolve_thenable_job(vm, promise_to_resolve, thenable, then);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue