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 arguments.caller from the spec #670
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
erights
Sep 12, 2016
I just tested and am surprised to see that this is correct. Good riddance! Now that arguments.caller is totally and permanently dead, I agree we no longer need to guard against it. I support this removal.
erights
commented
Sep 12, 2016
|
I just tested and am surprised to see that this is correct. Good riddance! Now that arguments.caller is totally and permanently dead, I agree we no longer need to guard against it. I support this removal. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
leobalter
Sep 12, 2016
Member
I'll add this to the agenda for the next meeting for the consensus formalities.
@claudepache do you want to prepare a PR for this? Otherwise I can do it, also checking test262.
|
I'll add this to the agenda for the next meeting for the consensus formalities. @claudepache do you want to prepare a PR for this? Otherwise I can do it, also checking test262. |
claudepache commentedAug 17, 2016
•
edited
Note. Not to be confused with
Function#caller.The spec acknowledges that
arguments.caller“has historically been provided as an implementation-defined extension by some ECMAScript implementations”.However, nowadays this historical wart is not found in any browser since long ago, e.g.:
I think one can clean the spec by removing all special cases around
arguments.caller. As far as I can see, the modifications would be:"caller", together with the remark ”If an implementation does not provide a built-in caller property for argument exotic objects then step 7 of this algorithm must be skipped.”"caller"special case and the remark ”If an implementation does not provide a built-in caller property for argument exotic objects then step 2 of this algorithm must be skipped.”"caller".”non-configurable accessor properties named "caller" and "callee"a non-configurable accessor property named "callee" which throws a TypeError exception on access” — (Also, at the time of writing, backreference to section 9.2.7 is incorrect, it should be 9.4.4.7; was already reported in #572.)Concretely, for the implementations not supporting the arguments.caller extension, the changes resume to removing the "caller" poison-pill from their unmapped Arguments objects.