-
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
Remove the AddRestrictedFunctionProperties abstract operation #877
Comments
For reference, an alternative (or complementary) proposal is #562, which attempts to reflect what FireFox does. |
@allenwb 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 issue would remove that poison, though. |
Unless I’ve missed something, poison pill is not being removed from arguments ( |
@claudepache What do you think of this patch? |
Frankly, I don’t care. The best implementation of the wart (after nuking it), namely a deletable accessor property on a single object, Function.prototype, as implemented by FF, isn’t compliant to the spec, with or without this patch. |
In ES6 we intended to eliminate the poison-pill string function properties
caller
andarguments
but a few vestiges remain and should be eliminated.#867 identifies that the reference to AddRestrictedFunctionProperties (which adds the poison-pill properties to a function) in https://tc39.github.io/ecma262/#sec-forbidden-extensions is unnecessary and should be eliminated.
The only remaining use of AddRestrictedFunctionProperties is in CreateIntrinsics. That use is also unnecessary because of the definition of built-in function and the forbidden extension restrictions. Step 12 of that abstract operation should be deleted.
With those changes, there will not longer be any references to AddRestrictedFunctionProperties so its definition should also be removed from the specification.
The text was updated successfully, but these errors were encountered: