electron/patches/node/fixme_remove_async_id_assertion_check.patch
Electron Bot c157311373
chore: bump node to v12.18.2 (master) (#24381)
* chore: bump node in DEPS to v12.18.2

* update patches

Co-authored-by: Electron Bot <anonymous@electronjs.org>
2020-07-01 15:39:35 -04:00

27 lines
1.1 KiB
Diff

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
async hooks are hella broken in Electron. This was checking that they weren't,
but they are, so we just disabled the check. YOLO.
diff --git a/src/api/callback.cc b/src/api/callback.cc
index a03a2587b4c7963a7f356b6b3af8654405bcfd36..cd0050978d387c2d2228653a8e812a31a1145819 100644
--- a/src/api/callback.cc
+++ b/src/api/callback.cc
@@ -117,12 +117,14 @@ void InternalCallbackScope::Close() {
perform_stopping_check();
}
+#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;