{"action":"created","comment":{"url":"https://api.github.com/repos/angular/zone.js/pulls/comments/89547533","pull_request_review_id":10093395,"id":89547533,"diff_hunk":"@@ -280,9 +280,15 @@ export function makeZoneAwareRemoveAllListeners(fnName: string, useCapturingPara\n   const defaultUseCapturing = useCapturingParam ? false : undefined;\n \n   return function zoneAwareRemoveAllListener(self: any, args: any[]) {\n+    var target = self || _global;\n+    if (args.length === 0) {\n+      // remove all listeners without eventName\n+      target[EVENT_TASKS] = [];\n+      target[symbol]();\n+      return;\n+    }\n     var eventName = args[0];\n     var useCapturing = args[1] || defaultUseCapturing;\n-    var target = self || _global;\n     var eventTasks = findAllExistingRegisteredTasks(target, eventName, useCapturing, true);","path":"lib/common/utils.ts","position":14,"original_position":14,"commit_id":"1d3e3d40c6a052fe9819dd21fc464c4c3454150e","original_commit_id":"1d3e3d40c6a052fe9819dd21fc464c4c3454150e","user":{"login":"KrauseStefan","id":1446336,"avatar_url":"https://avatars.githubusercontent.com/u/1446336?v=3","gravatar_id":"","url":"https://api.github.com/users/KrauseStefan","html_url":"https://github.com/KrauseStefan","followers_url":"https://api.github.com/users/KrauseStefan/followers","following_url":"https://api.github.com/users/KrauseStefan/following{/other_user}","gists_url":"https://api.github.com/users/KrauseStefan/gists{/gist_id}","starred_url":"https://api.github.com/users/KrauseStefan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrauseStefan/subscriptions","organizations_url":"https://api.github.com/users/KrauseStefan/orgs","repos_url":"https://api.github.com/users/KrauseStefan/repos","events_url":"https://api.github.com/users/KrauseStefan/events{/privacy}","received_events_url":"https://api.github.com/users/KrauseStefan/received_events","type":"User","site_admin":false},"body":"When all all listeners are removed shouldn't all the eventTasks also be chanceled?\r\nI believe we need to look into how to use `findAllExistingRegisteredTasks` to get and cancel all eventTasks.","created_at":"2016-11-24T21:36:21Z","updated_at":"2016-11-24T22:01:19Z","html_url":"https://github.com/angular/zone.js/pull/516#discussion_r89547533","pull_request_url":"https://api.github.com/repos/angular/zone.js/pulls/516","_links":{"self":{"href":"https://api.github.com/repos/angular/zone.js/pulls/comments/89547533"},"html":{"href":"https://github.com/angular/zone.js/pull/516#discussion_r89547533"},"pull_request":{"href":"https://api.github.com/repos/angular/zone.js/pulls/516"}}},"pull_request":{"url":"https://api.github.com/repos/angular/zone.js/pulls/516","id":94938569,"html_url":"https://github.com/angular/zone.js/pull/516","diff_url":"https://github.com/angular/zone.js/pull/516.diff","patch_url":"https://github.com/angular/zone.js/pull/516.patch","issue_url":"https://api.github.com/repos/angular/zone.js/issues/516","number":516,"state":"open","locked":false,"title":"Patch captureStackTrace/prepareStackTrace to ZoneAwareError, patch process.nextTick, fix removeAllListeners bug","user":{"login":"JiaLiPassion","id":1442575,"avatar_url":"https://avatars.githubusercontent.com/u/1442575?v=3","gravatar_id":"","url":"https://api.github.com/users/JiaLiPassion","html_url":"https://github.com/JiaLiPassion","followers_url":"https://api.github.com/users/JiaLiPassion/followers","following_url":"https://api.github.com/users/JiaLiPassion/following{/other_user}","gists_url":"https://api.github.com/users/JiaLiPassion/gists{/gist_id}","starred_url":"https://api.github.com/users/JiaLiPassion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiaLiPassion/subscriptions","organizations_url":"https://api.github.com/users/JiaLiPassion/orgs","repos_url":"https://api.github.com/users/JiaLiPassion/repos","events_url":"https://api.github.com/users/JiaLiPassion/events{/privacy}","received_events_url":"https://api.github.com/users/JiaLiPassion/received_events","type":"User","site_admin":false},"body":"1. ZoneAwareError didn't add captureStackTrace method, so it will failed when user call Error.captureStackTrace. for example issue #515 \r\n\r\n2. ZoneAwareError didn't add Error.prepareStackTrace callback, so if user add prepareStackTrace callback to Error, the callback will not be executed. for example issue #515 \r\n\r\nhttps://github.com/v8/v8/wiki/Stack-Trace-API\r\n\r\n3. patch process.nextTick to make the callback inzone.\r\n\r\n4. modify a typo, FrameType.trasition->FrameType.transition\r\n\r\n5. fix EventEmitter.removeAllListeners bug #518, when call EventEmitter.removeAllListeners without eventName, should remove all eventListener, and add some test cases for EventEmitter.removeListener/newListener.","created_at":"2016-11-23T03:04:25Z","updated_at":"2016-11-24T22:01:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaccefb52bc4939480b54a6ab501cbac283637e2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/angular/zone.js/pulls/516/commits","review_comments_url":"https://api.github.com/repos/angular/zone.js/pulls/516/comments","review_comment_url":"https://api.github.com/repos/angular/zone.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/zone.js/issues/516/comments","statuses_url":"https://api.github.com/repos/angular/zone.js/statuses/1d3e3d40c6a052fe9819dd21fc464c4c3454150e","head":{"label":"JiaLiPassion:master","ref":"master","sha":"1d3e3d40c6a052fe9819dd21fc464c4c3454150e","user":{"login":"JiaLiPassion","id":1442575,"avatar_url":"https://avatars.githubusercontent.com/u/1442575?v=3","gravatar_id":"","url":"https://api.github.com/users/JiaLiPassion","html_url":"https://github.com/JiaLiPassion","followers_url":"https://api.github.com/users/JiaLiPassion/followers","following_url":"https://api.github.com/users/JiaLiPassion/following{/other_user}","gists_url":"https://api.github.com/users/JiaLiPassion/gists{/gist_id}","starred_url":"https://api.github.com/users/JiaLiPassion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiaLiPassion/subscriptions","organizations_url":"https://api.github.com/users/JiaLiPassion/orgs","repos_url":"https://api.github.com/users/JiaLiPassion/repos","events_url":"https://api.github.com/users/JiaLiPassion/events{/privacy}","received_events_url":"https://api.github.com/users/JiaLiPassion/received_events","type":"User","site_admin":false},"repo":{"id":65861609,"name":"zone.js","full_name":"JiaLiPassion/zone.js","owner":{"login":"JiaLiPassion","id":1442575,"avatar_url":"https://avatars.githubusercontent.com/u/1442575?v=3","gravatar_id":"","url":"https://api.github.com/users/JiaLiPassion","html_url":"https://github.com/JiaLiPassion","followers_url":"https://api.github.com/users/JiaLiPassion/followers","following_url":"https://api.github.com/users/JiaLiPassion/following{/other_user}","gists_url":"https://api.github.com/users/JiaLiPassion/gists{/gist_id}","starred_url":"https://api.github.com/users/JiaLiPassion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiaLiPassion/subscriptions","organizations_url":"https://api.github.com/users/JiaLiPassion/orgs","repos_url":"https://api.github.com/users/JiaLiPassion/repos","events_url":"https://api.github.com/users/JiaLiPassion/events{/privacy}","received_events_url":"https://api.github.com/users/JiaLiPassion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JiaLiPassion/zone.js","description":"Implements Zones for JavaScript","fork":true,"url":"https://api.github.com/repos/JiaLiPassion/zone.js","forks_url":"https://api.github.com/repos/JiaLiPassion/zone.js/forks","keys_url":"https://api.github.com/repos/JiaLiPassion/zone.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JiaLiPassion/zone.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JiaLiPassion/zone.js/teams","hooks_url":"https://api.github.com/repos/JiaLiPassion/zone.js/hooks","issue_events_url":"https://api.github.com/repos/JiaLiPassion/zone.js/issues/events{/number}","events_url":"https://api.github.com/repos/JiaLiPassion/zone.js/events","assignees_url":"https://api.github.com/repos/JiaLiPassion/zone.js/assignees{/user}","branches_url":"https://api.github.com/repos/JiaLiPassion/zone.js/branches{/branch}","tags_url":"https://api.github.com/repos/JiaLiPassion/zone.js/tags","blobs_url":"https://api.github.com/repos/JiaLiPassion/zone.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JiaLiPassion/zone.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JiaLiPassion/zone.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/JiaLiPassion/zone.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JiaLiPassion/zone.js/statuses/{sha}","languages_url":"https://api.github.com/repos/JiaLiPassion/zone.js/languages","stargazers_url":"https://api.github.com/repos/JiaLiPassion/zone.js/stargazers","contributors_url":"https://api.github.com/repos/JiaLiPassion/zone.js/contributors","subscribers_url":"https://api.github.com/repos/JiaLiPassion/zone.js/subscribers","subscription_url":"https://api.github.com/repos/JiaLiPassion/zone.js/subscription","commits_url":"https://api.github.com/repos/JiaLiPassion/zone.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/JiaLiPassion/zone.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/JiaLiPassion/zone.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/JiaLiPassion/zone.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/JiaLiPassion/zone.js/contents/{+path}","compare_url":"https://api.github.com/repos/JiaLiPassion/zone.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JiaLiPassion/zone.js/merges","archive_url":"https://api.github.com/repos/JiaLiPassion/zone.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JiaLiPassion/zone.js/downloads","issues_url":"https://api.github.com/repos/JiaLiPassion/zone.js/issues{/number}","pulls_url":"https://api.github.com/repos/JiaLiPassion/zone.js/pulls{/number}","milestones_url":"https://api.github.com/repos/JiaLiPassion/zone.js/milestones{/number}","notifications_url":"https://api.github.com/repos/JiaLiPassion/zone.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JiaLiPassion/zone.js/labels{/name}","releases_url":"https://api.github.com/repos/JiaLiPassion/zone.js/releases{/id}","deployments_url":"https://api.github.com/repos/JiaLiPassion/zone.js/deployments","created_at":"2016-08-16T23:55:53Z","updated_at":"2016-11-04T15:52:39Z","pushed_at":"2016-11-24T15:21:08Z","git_url":"git://github.com/JiaLiPassion/zone.js.git","ssh_url":"git@github.com:JiaLiPassion/zone.js.git","clone_url":"https://github.com/JiaLiPassion/zone.js.git","svn_url":"https://github.com/JiaLiPassion/zone.js","homepage":"https://github.com/angular/zone.js","size":1289,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"402971a5296d3f082364dac290e03fe7e1cbd038","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":15467734,"name":"zone.js","full_name":"angular/zone.js","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/zone.js","description":"Implements Zones for JavaScript","fork":false,"url":"https://api.github.com/repos/angular/zone.js","forks_url":"https://api.github.com/repos/angular/zone.js/forks","keys_url":"https://api.github.com/repos/angular/zone.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/zone.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/zone.js/teams","hooks_url":"https://api.github.com/repos/angular/zone.js/hooks","issue_events_url":"https://api.github.com/repos/angular/zone.js/issues/events{/number}","events_url":"https://api.github.com/repos/angular/zone.js/events","assignees_url":"https://api.github.com/repos/angular/zone.js/assignees{/user}","branches_url":"https://api.github.com/repos/angular/zone.js/branches{/branch}","tags_url":"https://api.github.com/repos/angular/zone.js/tags","blobs_url":"https://api.github.com/repos/angular/zone.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/zone.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/zone.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/zone.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/zone.js/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/zone.js/languages","stargazers_url":"https://api.github.com/repos/angular/zone.js/stargazers","contributors_url":"https://api.github.com/repos/angular/zone.js/contributors","subscribers_url":"https://api.github.com/repos/angular/zone.js/subscribers","subscription_url":"https://api.github.com/repos/angular/zone.js/subscription","commits_url":"https://api.github.com/repos/angular/zone.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/zone.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/zone.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/zone.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/zone.js/contents/{+path}","compare_url":"https://api.github.com/repos/angular/zone.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/zone.js/merges","archive_url":"https://api.github.com/repos/angular/zone.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/zone.js/downloads","issues_url":"https://api.github.com/repos/angular/zone.js/issues{/number}","pulls_url":"https://api.github.com/repos/angular/zone.js/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/zone.js/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/zone.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/zone.js/labels{/name}","releases_url":"https://api.github.com/repos/angular/zone.js/releases{/id}","deployments_url":"https://api.github.com/repos/angular/zone.js/deployments","created_at":"2013-12-27T06:08:07Z","updated_at":"2016-11-24T19:30:47Z","pushed_at":"2016-11-24T15:21:10Z","git_url":"git://github.com/angular/zone.js.git","ssh_url":"git@github.com:angular/zone.js.git","clone_url":"https://github.com/angular/zone.js.git","svn_url":"https://github.com/angular/zone.js","homepage":"https://github.com/angular/zone.js","size":1741,"stargazers_count":1807,"watchers_count":1807,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":189,"mirror_url":null,"open_issues_count":131,"forks":189,"open_issues":131,"watchers":1807,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/zone.js/pulls/516"},"html":{"href":"https://github.com/angular/zone.js/pull/516"},"issue":{"href":"https://api.github.com/repos/angular/zone.js/issues/516"},"comments":{"href":"https://api.github.com/repos/angular/zone.js/issues/516/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/zone.js/pulls/516/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/zone.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/zone.js/pulls/516/commits"},"statuses":{"href":"https://api.github.com/repos/angular/zone.js/statuses/1d3e3d40c6a052fe9819dd21fc464c4c3454150e"}}}}
{"actor":{"display_login":"KrauseStefan"}}