From fd53482db26d3de23b0ff2bfe3f2fa67b23d7c7c Mon Sep 17 00:00:00 2001 From: Igor Sheludko Date: Wed, 11 Mar 2026 14:36:45 +0100 Subject: [PATCH] deps: V8: cherry-pick be84cdeee94e Original commit message: [d8] Handle termination exception in async modules ... instead of failing a CHECK. Fixed: 488754141 Change-Id: If97aea17887b731434a776bbac3ffba47b422417 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7653802 Reviewed-by: Patrick Thier Auto-Submit: Igor Sheludko Commit-Queue: Igor Sheludko Commit-Queue: Patrick Thier Cr-Commit-Position: refs/heads/main@{#105734} Refs: https://github.com/v8/v8/commit/be84cdeee94ee2574352cd6527d9a2f0bc0bea54 PR-URL: https://github.com/nodejs/node/pull/67570 Reviewed-By: Robert Nagy Reviewed-By: James M Snell --- common.gypi | 2 +- deps/v8/src/objects/source-text-module.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index b92d7fd19a2..71840b13acd 100644 --- a/common.gypi +++ b/common.gypi @@ -50,7 +50,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.57', + 'v8_embedder_string': '-node.58', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/objects/source-text-module.cc b/deps/v8/src/objects/source-text-module.cc index 101373b83c6..127892250ae 100644 --- a/deps/v8/src/objects/source-text-module.cc +++ b/deps/v8/src/objects/source-text-module.cc @@ -1021,6 +1021,9 @@ Maybe SourceTextModule::AsyncModuleExecutionFulfilled( MaybeDirectHandle exception; // ii. If result is an abrupt completion, then if (!ExecuteModule(isolate, m, &exception).ToHandle(&unused_result)) { + DCHECK_IMPLIES(exception.IsEmpty(), + isolate->is_execution_terminating()); + if (isolate->is_execution_terminating()) return {}; // 1. Perform AsyncModuleExecutionRejected(m, result.[[Value]]). AsyncModuleExecutionRejected(isolate, m, exception.ToHandleChecked()); } else { // iii. Else,