mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
LibJS: Convert Promise::create() to NonnullGCPtr
This commit is contained in:
parent
ddc6e139a6
commit
a4d85cd522
16 changed files with 26 additions and 26 deletions
|
@ -42,9 +42,9 @@ ThrowCompletionOr<Object*> promise_resolve(VM& vm, Object& constructor, Value va
|
|||
return promise_capability->promise().ptr();
|
||||
}
|
||||
|
||||
Promise* Promise::create(Realm& realm)
|
||||
NonnullGCPtr<Promise> Promise::create(Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<Promise>(realm, *realm.intrinsics().promise_prototype());
|
||||
return *realm.heap().allocate<Promise>(realm, *realm.intrinsics().promise_prototype());
|
||||
}
|
||||
|
||||
// 27.2 Promise Objects, https://tc39.es/ecma262/#sec-promise-objects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue