-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional test for cloning of error stacks #17159
Conversation
}, 'web API-created DOMException'); | ||
|
||
|
||
function stackTest(errorFactory, description) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be easier to read if this was defined upfront, especially if we end up adding more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally find defining helper functions later better, as it lets you focus on the tests and not the implementation details of them. It's a style thing, IMO.
const error = errorFactory(); | ||
const originalStack = error.stack; | ||
|
||
if (!originalStack) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For which implementations does this hold?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chrome, for example, does not have stacks on user-created DOMExceptions. Given that this entire area is underspecified, I definitely don't want to require it.
...astructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.window.js
Outdated
Show resolved
Hide resolved
...astructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.window.js
Outdated
Show resolved
Hide resolved
@annevk this should be ready for another look |
Define serialization and deserialization steps for all built-in NativeError types from the JavaScript specification. This change doesn't cover DOMExceptions, which are covered by whatwg/webidl#732. Fixes #4268. Tests: * web-platform-tests/wpt#17095 * web-platform-tests/wpt#17159
Fixes #729. See also whatwg/html#4268. Tests: * web-platform-tests/wpt#17095 * web-platform-tests/wpt#17159
Going to close and reopen to try to fix the taskcluster failure. |
...ucture/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js
Outdated
Show resolved
Hide resolved
Supplements #17095. Follows whatwg/html#4665 and whatwg/webidl#732.
Consolidated echo window/worker into resources/ directory
fc05e3e
to
a3c2eb5
Compare
I rebased this on master and added a commit. It'd be nice to get this landed as further SharedArrayBuffer work needs to build on this. |
Supplements #17095.
Follows whatwg/html#4665 and whatwg/webidl#732.
/cc @yutakahirano