mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
Everywhere: Convert VM::call() to JS::call()
This commit is contained in:
parent
d436746c95
commit
1ef633472b
37 changed files with 160 additions and 157 deletions
|
@ -88,14 +88,14 @@ ThrowCompletionOr<Value> PromiseReactionJob::call()
|
|||
// i. Let status be Call(promiseCapability.[[Reject]], undefined, « handlerResult.[[Value]] »).
|
||||
auto* reject_function = promise_capability.value().reject;
|
||||
dbgln_if(PROMISE_DEBUG, "[PromiseReactionJob @ {}]: Calling PromiseCapability's reject function @ {}", this, reject_function);
|
||||
return vm.call(*reject_function, js_undefined(), *handler_result.value());
|
||||
return JS::call(global_object, *reject_function, js_undefined(), *handler_result.value());
|
||||
}
|
||||
// i. Else,
|
||||
else {
|
||||
// i. Let status be Call(promiseCapability.[[Resolve]], undefined, « handlerResult.[[Value]] »).
|
||||
auto* resolve_function = promise_capability.value().resolve;
|
||||
dbgln_if(PROMISE_DEBUG, "[PromiseReactionJob @ {}]: Calling PromiseCapability's resolve function @ {}", this, resolve_function);
|
||||
return vm.call(*resolve_function, js_undefined(), *handler_result.value());
|
||||
return JS::call(global_object, *resolve_function, js_undefined(), *handler_result.value());
|
||||
}
|
||||
|
||||
// j. Return Completion(status).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue