mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src: replace new Array creation
PR-URL: https://github.com/nodejs/node/pull/24601 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
1 parent
c15efcec92
commit
955a8a720a
1 file changed
+5
-4
+5
-4
@@ -50,11 +50,12 @@ void SetupNextTick(const FunctionCallbackInfo<Value>& args) {
|
||||
.ToLocalChecked();
|
||||
run_microtasks_fn->SetName(FIXED_ONE_BYTE_STRING(isolate, "runMicrotasks"));
|
||||
|
||||
Local<Array> ret = Array::New(isolate, 2);
|
||||
ret->Set(context, 0, env->tick_info()->fields().GetJSArray()).FromJust();
|
||||
ret->Set(context, 1, run_microtasks_fn).FromJust();
|
||||
Local<Value> ret[] = {
|
||||
env->tick_info()->fields().GetJSArray(),
|
||||
run_microtasks_fn
|
||||
};
|
||||
|
||||
args.GetReturnValue().Set(ret);
|
||||
args.GetReturnValue().Set(Array::New(isolate, ret, arraysize(ret)));
|
||||
}
|
||||
|
||||
void PromiseRejectCallback(PromiseRejectMessage message) {
|
||||
|
||||
Reference in new issue
Block a user