-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Internal method invariants vague about exceptions #680
Comments
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? |
It would help me, I think I got myself confused a few times now reading that section. |
Note that 6.1.7.2 says:
|
(Yes, but also note that it didn't say that when @annevk opened this issue.) |
We ES6, at approximately the same place said:
The explicit case would have been covered by being explicit. |
Yup, and saying that it returns a Completion Record wasn't enough to answer the original question. |
Thanks for fixing this @jmdyck! |
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.
The text was updated successfully, but these errors were encountered: