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 arguments.caller from the spec #670

Closed
claudepache opened this Issue Aug 17, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@claudepache
Contributor

claudepache commented Aug 17, 2016

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:

  • 9.4.4. Arguments Exotic Objects, Note 3: remove the mention of "caller".
  • 9.4.4.1 [[GetOwnProperty]] of Arguments objects: remove step 7, that special-cases "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.”
  • 9.4.4.5 [[HasProperty]] of Arguments objects, use the same implementation as ordinary objects, removing the "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.
  • 9.4.4.7. CreateUnmappedArgumentsObject, remove step 9, that adds a "caller" poison-pill to unmapped arguments objects.
  • 16.2 Forbidden Extensions, add: “Arguments objects, both mapped and unmapped, must not be created with an own property named "caller".”
  • Annex C The Strict Mode of ECMAScript, modify item: “Arguments objects for strict functions define 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.

@erights

This comment has been minimized.

Show comment
Hide comment
@erights

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.

@leobalter

This comment has been minimized.

Show comment
Hide comment
@leobalter

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.

Member

leobalter commented Sep 12, 2016

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.

bterlson added a commit to bterlson/ecma262 that referenced this issue Sep 12, 2016

Normative: Remove arguments.caller poison pill
Implementations have not had this extension for many years so continuing
to poison pill it is needless. This removes all mention of arguments
object's "caller" property with the exception of a note that gives a bit
of history (mostly so people can still ctrl+f "caller").

Closes tc39#670.

bterlson added a commit to bterlson/ecma262 that referenced this issue Sep 12, 2016

Normative: Remove arguments.caller poison pill
Implementations have not had this extension for many years so continuing
to poison pill it is needless. This removes all mention of arguments
object's "caller" property with the exception of a note that gives a bit
of history (mostly so people can still ctrl+f "caller").

Closes tc39#670.

bterlson added a commit that referenced this issue Sep 29, 2016

Normative: Remove arguments.caller poison pill (#689)
Implementations have not had this extension for many years so continuing
to poison pill it is needless. This removes all mention of arguments
object's "caller" property with the exception of a note that gives a bit
of history (mostly so people can still ctrl+f "caller").

Closes #670.

kisg pushed a commit to paul99/v8mips that referenced this issue Nov 4, 2016

Remove the 'caller' property from the strict-mode arguments map
This was removed from ECMAScript in the September 2016 TC39 meeting, see tc39/ecma262#670.

BUG=v8:5535

Review-Url: https://codereview.chromium.org/2430383004
Cr-Commit-Position: refs/heads/master@{#40770}

hferreiro added a commit to hferreiro/v8 that referenced this issue Nov 8, 2016

Remove the 'caller' property from the strict-mode arguments map
This was removed from ECMAScript in the September 2016 TC39 meeting, see
tc39/ecma262#670.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment