Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upInternal method invariants vague about exceptions #680
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
claudepache
Aug 30, 2016
Contributor
All internal methods may throw: that can happen notably, but not exclusively, when user-defined code is triggered and throws (Proxies, user-defined accessors, etc.). And https://tc39.github.io/ecma262/#sec-invariants-of-the-essential-internal-methods applies only when the internal method returns nonabruptly: maybe that should be said explicitly?
|
All internal methods may throw: that can happen notably, but not exclusively, when user-defined code is triggered and throws (Proxies, user-defined accessors, etc.). And https://tc39.github.io/ecma262/#sec-invariants-of-the-essential-internal-methods applies only when the internal method returns nonabruptly: maybe that should be said explicitly? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
annevk
Aug 30, 2016
Contributor
It would help me, I think I got myself confused a few times now reading that section.
|
It would help me, I think I got myself confused a few times now reading that section. |
annevk commentedAug 30, 2016
A number of internal methods can throw per HTML, but https://tc39.github.io/ecma262/#sec-invariants-of-the-essential-internal-methods is not clear on whether that is allowed. (Despite it already being implicitly allowed, e.g., OrdinaryDelete invoking [[GetOwnProperty]] with a ? in front of it.)
This came up in whatwg/html#1726 as cross-origin [[Delete]] always throws in implementations, even outside "strict mode", and therefore cannot simply return false.