Skip to content

Commit bee4451

Browse files
devsnekruyadorno
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: #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 49f6b97 commit bee4451

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)