mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibJS: Replace GlobalObject with VM in Promise AOs [Part 8/19]
This commit is contained in:
parent
ccdfa2320c
commit
d74f8039eb
19 changed files with 151 additions and 137 deletions
|
@ -12,10 +12,10 @@
|
|||
namespace JS {
|
||||
|
||||
// 27.2.1.5 NewPromiseCapability ( C ), https://tc39.es/ecma262/#sec-newpromisecapability
|
||||
ThrowCompletionOr<PromiseCapability> new_promise_capability(GlobalObject& global_object, Value constructor)
|
||||
ThrowCompletionOr<PromiseCapability> new_promise_capability(VM& vm, Value constructor)
|
||||
{
|
||||
auto& vm = global_object.vm();
|
||||
auto& realm = *global_object.associated_realm();
|
||||
auto& realm = *vm.current_realm();
|
||||
auto& global_object = realm.global_object();
|
||||
|
||||
// 1. If IsConstructor(C) is false, throw a TypeError exception.
|
||||
if (!constructor.is_constructor())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue