Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit dc8fe9d

Browse files
committed
Remove the assertion of async_id
It is crashing in Electron, I doubt it is caused by the node integration code.
1 parent e03bf45 commit dc8fe9d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/async-wrap.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,10 +715,12 @@ Local<Value> AsyncWrap::MakeCallback(const Local<Function> cb,
715715
env()->isolate()->RunMicrotasks();
716716
}
717717

718+
#if 0
718719
// Make sure the stack unwound properly. If there are nested MakeCallback's
719720
// then it should return early and not reach this code.
720721
CHECK_EQ(env()->current_async_id(), 0);
721722
CHECK_EQ(env()->trigger_id(), 0);
723+
#endif
722724

723725
Local<Object> process = env()->process_object();
724726

@@ -733,9 +735,11 @@ Local<Value> AsyncWrap::MakeCallback(const Local<Function> cb,
733735
0,
734736
nullptr);
735737

738+
#if 0
736739
// Make sure the stack unwound properly.
737740
CHECK_EQ(env()->current_async_id(), 0);
738741
CHECK_EQ(env()->trigger_id(), 0);
742+
#endif
739743

740744
return rcheck.IsEmpty() ? Local<Value>() : ret_v;
741745
}

src/node.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,10 +1364,12 @@ MaybeLocal<Value> MakeCallback(Environment* env,
13641364
env->isolate()->RunMicrotasks();
13651365
}
13661366

1367+
#if 0
13671368
// Make sure the stack unwound properly. If there are nested MakeCallback's
13681369
// then it should return early and not reach this code.
13691370
CHECK_EQ(env->current_async_id(), asyncContext.async_id);
13701371
CHECK_EQ(env->trigger_id(), asyncContext.trigger_async_id);
1372+
#endif
13711373

13721374
Local<Object> process = env->process_object();
13731375

0 commit comments

Comments
 (0)