Skip to content
forked from v8/v8

Commit

Permalink
[runtime] Make Error.captureStackTrace() a no-op for global object
Browse files Browse the repository at this point in the history
(cherry picked from commit fa81078)

Bug: chromium:1432210
Change-Id: I8aa4c3f1d9ecbfffce503085c2879416ff916c69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4417690
Commit-Queue: Igor Sheludko <[email protected]>
Reviewed-by: Tobias Tebbi <[email protected]>
Commit-Queue: Tobias Tebbi <[email protected]>
Auto-Submit: Igor Sheludko <[email protected]>
Cr-Original-Commit-Position: refs/heads/main@{#87045}
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4419051
Reviewed-by: Igor Sheludko <[email protected]>
Reviewed-by: Lutz Vahl <[email protected]>
Cr-Commit-Position: refs/branch-heads/11.3@{v8#14}
Cr-Branched-From: b0a3a06-refs/heads/11.3.244@{#1}
Cr-Branched-From: 0326cf6-refs/heads/main@{#86647}
  • Loading branch information
isheludko committed Apr 12, 2023
1 parent dc97ada commit 4d08e2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/builtins/builtins-error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ BUILTIN(ErrorCaptureStackTrace) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kInvalidArgument, object_obj));
}
if (object_obj->IsJSGlobalProxy()) {
return ReadOnlyRoots(isolate).undefined_value();
}

Handle<JSObject> object = Handle<JSObject>::cast(object_obj);
Handle<Object> caller = args.atOrUndefined(isolate, 2);
Expand Down

0 comments on commit 4d08e2d

Please sign in to comment.