mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 13:55:06 +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
|
@ -107,7 +107,7 @@ ThrowCompletionOr<Promise*> SyntheticModule::evaluate(VM& vm)
|
|||
|
||||
// 12. Return Completion(result).
|
||||
// Note: Because we expect it to return a promise we convert this here.
|
||||
auto* promise = Promise::create(realm());
|
||||
auto promise = Promise::create(realm());
|
||||
if (result.is_error()) {
|
||||
VERIFY(result.throw_completion().value().has_value());
|
||||
promise->reject(*result.throw_completion().value());
|
||||
|
@ -115,7 +115,7 @@ ThrowCompletionOr<Promise*> SyntheticModule::evaluate(VM& vm)
|
|||
// Note: This value probably isn't visible to JS code? But undefined is fine anyway.
|
||||
promise->fulfill(js_undefined());
|
||||
}
|
||||
return promise;
|
||||
return promise.ptr();
|
||||
}
|
||||
|
||||
// 1.2.2 SetSyntheticModuleExport ( module, exportName, exportValue ), https://tc39.es/proposal-json-modules/#sec-setsyntheticmoduleexport
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue