Skip to content

Commit 67f1b77

Browse files
devsnektargos
authored andcommitted
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 <[email protected]> Commit-Queue: Gus Caplan <[email protected]> Cr-Commit-Position: refs/heads/main@{#78909} Refs: v8/v8@cc9a8a3 PR-URL: nodejs#41823 Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Mary Marchini <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 2d17a95 commit 67f1b77

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.9',
39+
'v8_embedder_string': '-node.10',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/execution/messages.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ MaybeHandle<Object> ErrorUtils::FormatStackTrace(Isolate* isolate,
305305
const bool in_recursion = isolate->formatting_stack_trace();
306306
const bool has_overflowed = i::StackLimitCheck{isolate}.HasOverflowed();
307307
Handle<Context> error_context;
308-
if (!in_recursion && error->GetCreationContext().ToHandle(&error_context)) {
308+
if (!in_recursion && !has_overflowed &&
309+
error->GetCreationContext().ToHandle(&error_context)) {
309310
DCHECK(error_context->IsNativeContext());
310311

311312
if (isolate->HasPrepareStackTraceCallback()) {
@@ -321,7 +322,7 @@ MaybeHandle<Object> ErrorUtils::FormatStackTrace(Isolate* isolate,
321322
isolate->RunPrepareStackTraceCallback(error_context, error, sites),
322323
Object);
323324
return result;
324-
} else if (!has_overflowed) {
325+
} else {
325326
Handle<JSFunction> global_error =
326327
handle(error_context->error_function(), isolate);
327328

0 commit comments

Comments
 (0)