mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +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
|
@ -520,7 +520,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
|
|||
// anything of this sort. Both Gecko and Blink do it, however, so I'm sure it's correct.
|
||||
scoped_generator.append(R"~~~(
|
||||
if (!@js_name@@js_suffix@.is_object() || !is<JS::Promise>(@js_name@@js_suffix@.as_object())) {
|
||||
auto* new_promise = JS::Promise::create(realm);
|
||||
auto new_promise = JS::Promise::create(realm);
|
||||
new_promise->fulfill(@js_name@@js_suffix@);
|
||||
@js_name@@js_suffix@ = new_promise;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue