@@ -169,7 +169,6 @@ using v8::SealHandleScope;
169169using v8::String;
170170using v8::TryCatch;
171171using v8::Uint32Array;
172- using v8::Uint8Array;
173172using v8::Undefined;
174173using v8::V8;
175174using v8::Value;
@@ -1152,13 +1151,6 @@ void SetupNextTick(const FunctionCallbackInfo<Value>& args) {
11521151 env->context (),
11531152 FIXED_ONE_BYTE_STRING (env->isolate (), " _setupNextTick" )).FromJust ();
11541153
1155- // Values use to cross communicate with processNextTick.
1156- uint8_t * const fields = env->tick_info ()->fields ();
1157- uint8_t const fields_count = env->tick_info ()->fields_count ();
1158-
1159- Local<ArrayBuffer> array_buffer =
1160- ArrayBuffer::New (env->isolate (), fields, sizeof (*fields) * fields_count);
1161-
11621154 v8::Local<v8::Function> run_microtasks_fn =
11631155 env->NewFunctionTemplate (RunMicrotasks)->GetFunction (env->context ())
11641156 .ToLocalChecked ();
@@ -1167,7 +1159,7 @@ void SetupNextTick(const FunctionCallbackInfo<Value>& args) {
11671159
11681160 Local<Array> ret = Array::New (env->isolate (), 2 );
11691161 ret->Set (env->context (), 0 ,
1170- Uint8Array::New (array_buffer, 0 , fields_count )).FromJust ();
1162+ env-> tick_info ()-> fields (). GetJSArray ( )).FromJust ();
11711163 ret->Set (env->context (), 1 , run_microtasks_fn).FromJust ();
11721164
11731165 args.GetReturnValue ().Set (ret);
@@ -1286,7 +1278,7 @@ void InternalCallbackScope::Close() {
12861278
12871279 Environment::TickInfo* tick_info = env_->tick_info ();
12881280
1289- if (tick_info->scheduled () == 0 ) {
1281+ if (! tick_info->has_scheduled () ) {
12901282 env_->isolate ()->RunMicrotasks ();
12911283 }
12921284
@@ -1297,7 +1289,7 @@ void InternalCallbackScope::Close() {
12971289 CHECK_EQ (env_->trigger_async_id (), 0 );
12981290 }
12991291
1300- if (tick_info->scheduled () == 0 ) {
1292+ if (! tick_info->has_scheduled () ) {
13011293 return ;
13021294 }
13031295
0 commit comments