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

Commit

Permalink
Remove the assertion of async_id
Browse files Browse the repository at this point in the history
It is crashing in Electron, I doubt it is caused by the node
integration code.
  • Loading branch information
zcbenz committed Aug 30, 2017
1 parent e03bf45 commit dc8fe9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/async-wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,12 @@ Local<Value> AsyncWrap::MakeCallback(const Local<Function> cb,
env()->isolate()->RunMicrotasks();
}

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

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

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

#if 0
// Make sure the stack unwound properly.
CHECK_EQ(env()->current_async_id(), 0);
CHECK_EQ(env()->trigger_id(), 0);
#endif

return rcheck.IsEmpty() ? Local<Value>() : ret_v;
}
Expand Down
2 changes: 2 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1364,10 +1364,12 @@ MaybeLocal<Value> MakeCallback(Environment* env,
env->isolate()->RunMicrotasks();
}

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

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

Expand Down

0 comments on commit dc8fe9d

Please sign in to comment.