2019-07-16 17:23:04 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Shelley Vohr <shelley.vohr@gmail.com>
|
|
|
|
Date: Thu, 13 Sep 2018 09:08:10 -0700
|
|
|
|
Subject: FIXME: remove async_id assertion check
|
|
|
|
|
2019-12-13 17:18:45 +00:00
|
|
|
async hooks are hella broken in Electron. This was checking that they weren't,
|
|
|
|
but they are, so we just disabled the check. YOLO.
|
2019-07-16 17:23:04 +00:00
|
|
|
|
|
|
|
diff --git a/src/api/callback.cc b/src/api/callback.cc
|
2020-06-17 22:57:12 +00:00
|
|
|
index f7e7ddedfae377daa1441b0845c6828aedfc2a44..dc62f8cc1b80a1b7558ec1000ac856e9929c68a5 100644
|
2019-07-16 17:23:04 +00:00
|
|
|
--- a/src/api/callback.cc
|
|
|
|
+++ b/src/api/callback.cc
|
2020-03-03 21:35:05 +00:00
|
|
|
@@ -111,12 +111,14 @@ void InternalCallbackScope::Close() {
|
2019-10-18 23:52:15 +00:00
|
|
|
MicrotasksScope::PerformCheckpoint(env_->isolate());
|
2019-07-16 17:23:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
+#if 0 // FIXME(codebytere): figure out why this check fails/causes crash
|
|
|
|
// Make sure the stack unwound properly. If there are nested MakeCallback's
|
|
|
|
// then it should return early and not reach this code.
|
|
|
|
if (env_->async_hooks()->fields()[AsyncHooks::kTotals]) {
|
|
|
|
CHECK_EQ(env_->execution_async_id(), 0);
|
|
|
|
CHECK_EQ(env_->trigger_async_id(), 0);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
if (!tick_info->has_tick_scheduled() && !tick_info->has_rejection_to_warn()) {
|
|
|
|
return;
|