Skip to content

Commit fa81078

Browse files
isheludkoV8 LUCI CQ
authored andcommitted
[runtime] Make Error.captureStackTrace() a no-op for global object
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-Commit-Position: refs/heads/main@{#87045}
1 parent f7a3499 commit fa81078

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/builtins/builtins-error.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ BUILTIN(ErrorCaptureStackTrace) {
3535
THROW_NEW_ERROR_RETURN_FAILURE(
3636
isolate, NewTypeError(MessageTemplate::kInvalidArgument, object_obj));
3737
}
38+
if (object_obj->IsJSGlobalProxy()) {
39+
return ReadOnlyRoots(isolate).undefined_value();
40+
}
3841

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

0 commit comments

Comments
 (0)