mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibJS: Convert NativeFunction::create() to NonnullGCPtr
This commit is contained in:
parent
9846d23c79
commit
b42e293ddd
13 changed files with 23 additions and 23 deletions
|
@ -1043,7 +1043,7 @@ void VM::finish_dynamic_import(ScriptOrModule referencing_script_or_module, Modu
|
|||
};
|
||||
|
||||
// 2. Let onFulfilled be CreateBuiltinFunction(fulfilledClosure, 0, "", « »).
|
||||
auto* on_fulfilled = NativeFunction::create(realm, move(fulfilled_closure), 0, "");
|
||||
auto on_fulfilled = NativeFunction::create(realm, move(fulfilled_closure), 0, "");
|
||||
|
||||
// 3. Let rejectedClosure be a new Abstract Closure with parameters (error) that captures promiseCapability and performs the following steps when called:
|
||||
auto rejected_closure = [&promise_capability](VM& vm) -> ThrowCompletionOr<Value> {
|
||||
|
@ -1057,7 +1057,7 @@ void VM::finish_dynamic_import(ScriptOrModule referencing_script_or_module, Modu
|
|||
};
|
||||
|
||||
// 4. Let onRejected be CreateBuiltinFunction(rejectedClosure, 0, "", « »).
|
||||
auto* on_rejected = NativeFunction::create(realm, move(rejected_closure), 0, "");
|
||||
auto on_rejected = NativeFunction::create(realm, move(rejected_closure), 0, "");
|
||||
|
||||
// 5. Perform PerformPromiseThen(innerPromise, onFulfilled, onRejected).
|
||||
inner_promise->perform_then(on_fulfilled, on_rejected, {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue