mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 14:57:34 +00:00
LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr
This commit is contained in:
parent
1df3652e27
commit
7c0c1c8f49
214 changed files with 825 additions and 827 deletions
|
@ -298,12 +298,12 @@ ThrowCompletionOr<NonnullGCPtr<Object>> PromiseConstructor::construct(FunctionOb
|
|||
auto [resolve_function, reject_function] = promise->create_resolving_functions();
|
||||
|
||||
// 9. Let completion be Completion(Call(executor, undefined, « resolvingFunctions.[[Resolve]], resolvingFunctions.[[Reject]] »)).
|
||||
auto completion = JS::call(vm, executor.as_function(), js_undefined(), &resolve_function, &reject_function);
|
||||
auto completion = JS::call(vm, executor.as_function(), js_undefined(), resolve_function, reject_function);
|
||||
|
||||
// 10. If completion is an abrupt completion, then
|
||||
if (completion.is_error()) {
|
||||
// a. Perform ? Call(resolvingFunctions.[[Reject]], undefined, « completion.[[Value]] »).
|
||||
TRY(JS::call(vm, reject_function, js_undefined(), *completion.release_error().value()));
|
||||
TRY(JS::call(vm, *reject_function, js_undefined(), *completion.release_error().value()));
|
||||
}
|
||||
|
||||
// 11. Return promise.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue