REOPENED174216
Update DOMException to the latest spec
https://bugs.webkit.org/show_bug.cgi?id=174216
Summary Update DOMException to the latest spec
Domenic Denicola
Reported 2017-07-06 14:12:22 PDT
For years the spec for DOMException has not matched what was implemented. We recently fixed this by converging on the majority behavior, in https://github.com/heycam/webidl/pull/378. Failing-in-Safari tests are available at: - http://w3c-test.org/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.html - http://w3c-test.org/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.html - http://w3c-test.org/WebIDL/ecmascript-binding/es-exceptions/exceptions.html The spec is at: - https://heycam.github.io/webidl/#idl-DOMException - https://heycam.github.io/webidl/#idl-DOMException The following changes appear to be necessary to conform to the current spec: - Use getters on the prototype instead of own data properties for message/code/name. - Removing the toString() method and letting the default Error.prototype.toString() show through. - ("should", not "must") capturing stack traces for DOMExceptions, like for other Error classes.
Attachments
Anne van Kesteren
Comment 1 2017-07-14 06:26:10 PDT
Chris Dumez
Comment 2 2017-07-20 16:44:45 PDT
Fixed in dependency bugs.
Domenic Denicola
Comment 3 2017-07-20 16:47:01 PDT
Any interest in fixing the stack issue? I didn't see that in the dependency bugs.
Chris Dumez
Comment 4 2017-07-20 16:54:31 PDT
(In reply to Domenic Denicola from comment #3) > Any interest in fixing the stack issue? I didn't see that in the dependency > bugs. What stack issue? Is this covered by a web platform test?
Domenic Denicola
Comment 5 2017-07-20 17:02:14 PDT
The > - ("should", not "must") capturing stack traces for DOMExceptions, like for other Error classes. And yeah, it's the last test in http://w3c-test.org/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.html
Chris Dumez
Comment 6 2017-07-20 19:08:15 PDT
(In reply to Domenic Denicola from comment #5) > The > > > - ("should", not "must") capturing stack traces for DOMExceptions, like for other Error classes. > > And yeah, it's the last test in > http://w3c-test.org/WebIDL/ecmascript-binding/es-exceptions/DOMException- > custom-bindings.any.html Oh, I see. This does not sound super useful to me and is annoying to implement. I think I'll leave as is for now.
Chris Dumez
Comment 7 2017-07-20 19:10:43 PDT
(In reply to Chris Dumez from comment #6) > (In reply to Domenic Denicola from comment #5) > > The > > > > > - ("should", not "must") capturing stack traces for DOMExceptions, like for other Error classes. > > > > And yeah, it's the last test in > > http://w3c-test.org/WebIDL/ecmascript-binding/es-exceptions/DOMException- > > custom-bindings.any.html > > Oh, I see. This does not sound super useful to me and is annoying to > implement. I think I'll leave as is for now. But I filed https://bugs.webkit.org/show_bug.cgi?id=174702.
Note You need to log in before you can comment on or make changes to this bug.