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..58409f5fd7cf05 100644 --- a/deps/v8/src/execution/messages.cc +++ b/deps/v8/src/execution/messages.cc @@ -301,8 +301,10 @@ MaybeHandle ErrorUtils::FormatStackTrace(Isolate* isolate, Handle elems = Handle::cast(raw_stack); const bool in_recursion = isolate->formatting_stack_trace(); + const bool has_overflowed = i::StackLimitCheck{isolate}.HasOverflowed(); 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()) {