Bug 174702 - DOMException should have same properties as Error
Summary: DOMException should have same properties as Error
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 174216
  Show dependency treegraph
 
Reported: 2017-07-20 19:10 PDT by Chris Dumez
Modified: 2022-09-02 16:11 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-07-20 19:10:17 PDT
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
Comment 1 Ahmad Saleem 2022-09-02 16:11:02 PDT
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!