Consider reporting more information when ShadowRealm execution fails
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: mgaudet, Assigned: mgaudet)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
When a wrapped function, or ShadowRealm.prototype.evauate throws, the ShadowRealm proposal wraps all failures in a new TypeError.
It would be nice to annotate that type error with more information, to help programmers work with ShadowRealms (as is, the developer experience is sort of dreadful, as all failures look identical)
We could inspect and copy out the .message
and .name
properties, though, only using pure operations to avoid potential side-effects inside the shadow realm (unless https://github.com/tc39/proposal-shadowrealm/issues/353 is resolved in such a way that side effects are allowed)
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Conditionally attempt to extract .name and .message and use for issuing error.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Conditionally try to extract .name and .message and use in error message.
Depends on D151849
Comment 4•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8552d20058cf
https://hg.mozilla.org/mozilla-central/rev/262ce0dc4a1e
Description
•