Skip to content

Commit 97826d3

Browse files
committed
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: #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 28989b4 commit 97826d3

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.12',
39+
'v8_embedder_string': '-node.13',
4040

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

deps/v8/src/execution/messages.cc

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

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

0 commit comments

Comments
 (0)