{"action":"created","issue":{"url":"https://api.github.com/repos/tc39/ecma262/issues/562","repository_url":"https://api.github.com/repos/tc39/ecma262","labels_url":"https://api.github.com/repos/tc39/ecma262/issues/562/labels{/name}","comments_url":"https://api.github.com/repos/tc39/ecma262/issues/562/comments","events_url":"https://api.github.com/repos/tc39/ecma262/issues/562/events","html_url":"https://github.com/tc39/ecma262/issues/562","id":154041593,"number":562,"title":"Add Function#caller and Function#arguments to Annex B","user":{"login":"claudepache","id":3309637,"avatar_url":"https://avatars.githubusercontent.com/u/3309637?v=3","gravatar_id":"","url":"https://api.github.com/users/claudepache","html_url":"https://github.com/claudepache","followers_url":"https://api.github.com/users/claudepache/followers","following_url":"https://api.github.com/users/claudepache/following{/other_user}","gists_url":"https://api.github.com/users/claudepache/gists{/gist_id}","starred_url":"https://api.github.com/users/claudepache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudepache/subscriptions","organizations_url":"https://api.github.com/users/claudepache/orgs","repos_url":"https://api.github.com/users/claudepache/repos","events_url":"https://api.github.com/users/claudepache/events{/privacy}","received_events_url":"https://api.github.com/users/claudepache/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-10T15:51:05Z","updated_at":"2016-05-11T21:46:10Z","closed_at":null,"body":"... because I doubt that any browser vendor would kill them.\r\n\r\nI have written a strawman here: https://github.com/claudepache/es-legacy-function-reflection\r\n\r\nSome notes:\r\n* `Function#caller` and `Function#arguments` are specced as configurable getters on `Function.prototype` rather than properties of individual functions, following Firefox's example.\r\n\r\n* Moreover, a basic realm check is performed (step 3 of GetTopMostExecutionContextIfLeakable), so that after those properties are deleted, they cannot be recovered from another realm.\r\n\r\n* As `arguments.caller` is not supported by any browser, I think that step 9 of [CreateUnmappedArgumentsObject](https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject) can be removed.\r\n\r\n* `arguments.callee` is currently specced in ECMA262 as unavailable for sloppy-mode functions with nonsimple parameter list. Question: Should `Function#arguments` and `Function#caller` be disabled for those functions as well?\r\n"},"comment":{"url":"https://api.github.com/repos/tc39/ecma262/issues/comments/218600034","html_url":"https://github.com/tc39/ecma262/issues/562#issuecomment-218600034","issue_url":"https://api.github.com/repos/tc39/ecma262/issues/562","id":218600034,"user":{"login":"allenwb","id":505435,"avatar_url":"https://avatars.githubusercontent.com/u/505435?v=3","gravatar_id":"","url":"https://api.github.com/users/allenwb","html_url":"https://github.com/allenwb","followers_url":"https://api.github.com/users/allenwb/followers","following_url":"https://api.github.com/users/allenwb/following{/other_user}","gists_url":"https://api.github.com/users/allenwb/gists{/gist_id}","starred_url":"https://api.github.com/users/allenwb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenwb/subscriptions","organizations_url":"https://api.github.com/users/allenwb/orgs","repos_url":"https://api.github.com/users/allenwb/repos","events_url":"https://api.github.com/users/allenwb/events{/privacy}","received_events_url":"https://api.github.com/users/allenwb/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T21:46:10Z","updated_at":"2016-05-11T21:46:10Z","body":"The effect of `f.caller` when the caller of `f` is a strict mode function was specified in ES5.1: http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.5.4 \r\n\r\nNote that the specified behavior was to throw a TypeError.\r\n\r\nThat was removed from the ES6 spec. after Mark Miller and I convinced ourselves that it was no longer necessary because of other ES6 spec. changes.  But I don't remember the details right now. It is probably captured somewhere in bugs.ecmascript.org.\r\n\r\n"}}