electron/patches/node/fixme_remove_async_id_assertion_check.patch
Electron Bot 39baf68790
chore: bump chromium to 5b340c815ce15ab2efcf277ed19e9 (master) (#22064)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: loc <andy@slack-corp.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
2020-03-03 13:35:05 -08: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 355986b981a3811bcc835cf5dabcb720d2d5ee45..4dc268bc59a51e9645b2f69294d28fc11b29b364 100644
--- a/src/api/callback.cc
+++ b/src/api/callback.cc
@@ -111,12 +111,14 @@ void InternalCallbackScope::Close() {
MicrotasksScope::PerformCheckpoint(env_->isolate());
}
+#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;