-
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
Editorial: remove unnecessary AddRestrictedFunctionProperties #1148
base: main
Are you sure you want to change the base?
Conversation
With the definition of I though it might make sense after At that point, the only remaining use (in the ES spec, anyhow) of |
I believe ThrowTypeError is used in a number of places in this spec, but probably also in other specs - it’s not something we should be trying to remove. I’m fine to move it to another place, though - suggestions? |
Currently only 3:
This PR deletes the first and allows explicit use of (I thought there were more uses too, but it looks like there's never been very many.)
Wouldn't surprise me. Which is why I said "the only remaining use (in the ES spec, anyhow)".
If you think I'm trying to remove Speaking of which, it looks to me like (given this PR) CreateIntrinsics also wouldn't need to explicitly create |
I also suspect that those need to remain explicitly created and explicitly called out as intrinsics; either way, i think that’s out of scope for this PR, which is only trying to address #877 :-) |
Table 7 already explicitly calls them out as intrinsics. Why do you suspect that they need to remain explicitly created? (And why doesn't that suspicion extend to things like
Well, I think the only reason they're explicit in CreateIntrinsics is because of the call to |
I'm confused by this change. I thought we were removing the poison pill from arguments, but leaving it on Function.prototype so that strict mode functions will throw when they are accessed. It looks like this patch will remove that poison, though. |
See the linked issue; let’s clarify there. |
|
@claudepache please see the linked issue; it’d be great to hash it out there. |
I think this PR should simply be closed for the reasons @claudepache states. It is a normative change that doesn't reflect what browsers do or anything we agreed on. The poison pill still makes sense for the same reasons it was initially added. |
A PR thread is a completely appropriate place to discuss a proposed change, as @claudepache has done here. This PR doesn't do what I thought the bug was about, as it is a Normative rather than Editorial change. |
The issue was a detailed mention of something that could be removed; i made the PR. It’s fine to discuss things in PRs, but the OP of the issue has the opinion, i just attempted to implement it while trying to address open issues. If the issue discussion ends up with an alternative approach, I’ll be happy to close or update this PR. |
334007e
to
4123744
Compare
3d0c24c
to
7a79833
Compare
%ThrowTypeError%
Fixes #877. Relates to #867.
cc @anba @claudepache