From bd2127aee813367d2d683bef7ae433f1810fb63c Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Wed, 2 Feb 2022 09:54:37 -0600 Subject: [PATCH] deps: V8: cherry-pick cc9a8a37445e Original commit message: fix overflow check in error formatting Bug: v8:12494 Change-Id: Iba2684173296aa236f1a1c73a5606c21472eff06 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3426634 Reviewed-by: Jakob Kummerow Commit-Queue: Gus Caplan Cr-Commit-Position: refs/heads/main@{#78909} Refs: https://github.com/v8/v8/commit/cc9a8a37445eeffff17474020bb6038c2f9af9fc --- common.gypi | 2 +- deps/v8/src/execution/messages.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 99c7f371d9111a..adbd826a4f4352 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,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.19', + 'v8_embedder_string': '-node.20', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/execution/messages.cc b/deps/v8/src/execution/messages.cc index ad530e1f2a7531..e6fd6b17d61955 100644 --- a/deps/v8/src/execution/messages.cc +++ b/deps/v8/src/execution/messages.cc @@ -302,7 +302,8 @@ MaybeHandle ErrorUtils::FormatStackTrace(Isolate* isolate, const bool in_recursion = isolate->formatting_stack_trace(); Handle error_context; - if (!in_recursion && error->GetCreationContext().ToHandle(&error_context)) { + if (!in_recursion && !has_overflowed && + error->GetCreationContext().ToHandle(&error_context)) { DCHECK(error_context->IsNativeContext()); if (isolate->HasPrepareStackTraceCallback()) {