{"action":"created","issue":{"url":"https://api.github.com/repos/tc39/ecma262/issues/392","repository_url":"https://api.github.com/repos/tc39/ecma262","labels_url":"https://api.github.com/repos/tc39/ecma262/issues/392/labels{/name}","comments_url":"https://api.github.com/repos/tc39/ecma262/issues/392/comments","events_url":"https://api.github.com/repos/tc39/ecma262/issues/392/events","html_url":"https://github.com/tc39/ecma262/issues/392","id":133514682,"number":392,"title":"NewPromiseCapability & GetCapabilitiesExecutor Functions","user":{"login":"raulsebastianmihaila","id":5671355,"avatar_url":"https://avatars.githubusercontent.com/u/5671355?v=3","gravatar_id":"","url":"https://api.github.com/users/raulsebastianmihaila","html_url":"https://github.com/raulsebastianmihaila","followers_url":"https://api.github.com/users/raulsebastianmihaila/followers","following_url":"https://api.github.com/users/raulsebastianmihaila/following{/other_user}","gists_url":"https://api.github.com/users/raulsebastianmihaila/gists{/gist_id}","starred_url":"https://api.github.com/users/raulsebastianmihaila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raulsebastianmihaila/subscriptions","organizations_url":"https://api.github.com/users/raulsebastianmihaila/orgs","repos_url":"https://api.github.com/users/raulsebastianmihaila/repos","events_url":"https://api.github.com/users/raulsebastianmihaila/events{/privacy}","received_events_url":"https://api.github.com/users/raulsebastianmihaila/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-14T07:04:22Z","updated_at":"2016-02-14T07:57:55Z","closed_at":null,"body":"The way [GetCapabilitiesExecutor] (https://tc39.github.io/ecma262/#sec-getcapabilitiesexecutor-functions) is used in [NewPromiseCapability] (https://tc39.github.io/ecma262/#sec-newpromisecapability) doesn't make sense to me.\r\n\r\nFirst, there are some resolve and reject functions that are set as properties of the [[Capability]] slot of the executor that results from the operation. However, these resolve and reject functions are not passed as arguments in NewPromiseCapability. And, even if they were, in step 5 of NewPromiseCapability, the value of the [[Capability]] slot of the executor is replaced with the promise capability that was created in NewPromiseCapability, whose resolve and reject functions are undefined.\r\n\r\nOn the readability side, I think it would be an improvement to make GetCapabilitiesExecutor look more like other abstract operations: GetCapabilitiesExecutor(resolve, reject). And make it return F (the executor) instead of undefined. And explicitly pass resolve and reject from NewPormiseCapability."},"comment":{"url":"https://api.github.com/repos/tc39/ecma262/issues/comments/183845265","html_url":"https://github.com/tc39/ecma262/issues/392#issuecomment-183845265","issue_url":"https://api.github.com/repos/tc39/ecma262/issues/392","id":183845265,"user":{"login":"thefourtheye","id":696611,"avatar_url":"https://avatars.githubusercontent.com/u/696611?v=3","gravatar_id":"","url":"https://api.github.com/users/thefourtheye","html_url":"https://github.com/thefourtheye","followers_url":"https://api.github.com/users/thefourtheye/followers","following_url":"https://api.github.com/users/thefourtheye/following{/other_user}","gists_url":"https://api.github.com/users/thefourtheye/gists{/gist_id}","starred_url":"https://api.github.com/users/thefourtheye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefourtheye/subscriptions","organizations_url":"https://api.github.com/users/thefourtheye/orgs","repos_url":"https://api.github.com/users/thefourtheye/repos","events_url":"https://api.github.com/users/thefourtheye/events{/privacy}","received_events_url":"https://api.github.com/users/thefourtheye/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T07:57:55Z","updated_at":"2016-02-14T07:57:55Z","body":"@domenic I believe that, it should be explained better in the spec. Every time I go through the spec I get confused at that point and looks like I am not the only one."}}