Bug 174702
| Summary: | DOMException should have same properties as Error | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
| Component: | Bindings | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ahmad.saleem792, bfulgham, cdumez, d, fpizlo, ggaren, rniwa, sam |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 174216 | ||
Chris Dumez
DOMException should have same properties as Error, e.g. "stack" property, as per:
https://heycam.github.io/webidl/#es-DOMException-specialness
"""
If an implementation gives native Error objects special powers or nonstandard properties (such as a stack property), it should also expose those on DOMException instances.
"""
This is covered by the last check of:
http://w3c-test.org/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.html
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
Safari Technology Preview 152 fail this test from the w3c-test on Comment 0:
If the implementation has a stack property on normal errors, it also does on DOMExceptions
Chrome Canary 107 also fail this test and only Firefox Nightly 107 pass this:
_____
Chromium / Blink IDL File - https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/dom_exception.idl;l=1?q=dom_Exception.idl&sq=
Firefox Nightly 106 - https://searchfox.org/mozilla-central/source/dom/webidl/DOMException.webidl
Webkit GitHub - https://github.com/WebKit/WebKit/blob/ec6c52d11104000e83be471c46a1d087b334ac59/Source/WebCore/dom/DOMException.idl
_____
Just wanted to share updated results. Thanks!