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 upRemove the AddRestrictedFunctionProperties abstract operation #877
Comments
allenwb
referenced this issue
Apr 7, 2017
Open
Contradicting forbidden extensions for "caller" property on built-in functions? #867
added a commit
to ljharb/ecma262
that referenced
this issue
Mar 21, 2018
ljharb
referenced a pull request that will
close
this issue
Mar 21, 2018
Open
Editorial: remove unnecessary AddRestrictedFunctionProperties #1148
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
claudepache
Apr 4, 2018
Contributor
For reference, an alternative (or complementary) proposal is #562, which attempts to reflect what FireFox does.
|
For reference, an alternative (or complementary) proposal is #562, which attempts to reflect what FireFox does. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
littledan
Apr 5, 2018
Member
@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.
|
@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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
claudepache
Apr 5, 2018
Contributor
@littledan I thought we were removing the poison pill from arguments
Unless I’ve missed something, poison pill is not being removed from arguments (arguments.callee still throws in strict mode). We have removed the specific case arguments.caller because it was dead also in sloppy mode.
Unless I’ve missed something, poison pill is not being removed from arguments ( |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@claudepache What do you think of this patch? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
claudepache
Apr 13, 2018
Contributor
@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.
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. |
allenwb commentedApr 7, 2017
In ES6 we intended to eliminate the poison-pill string function properties
callerandargumentsbut 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.