{"action":"opened","number":147,"pull_request":{"url":"https://api.github.com/repos/angular/zone.js/pulls/147","id":40192586,"html_url":"https://github.com/angular/zone.js/pull/147","diff_url":"https://github.com/angular/zone.js/pull/147.diff","patch_url":"https://github.com/angular/zone.js/pull/147.patch","issue_url":"https://api.github.com/repos/angular/zone.js/issues/147","number":147,"state":"open","locked":false,"title":"fix(patch): do not leak zones when wrapping requestAnimationFrame","user":{"login":"justindujardin","id":101493,"avatar_url":"https://avatars.githubusercontent.com/u/101493?v=3","gravatar_id":"","url":"https://api.github.com/users/justindujardin","html_url":"https://github.com/justindujardin","followers_url":"https://api.github.com/users/justindujardin/followers","following_url":"https://api.github.com/users/justindujardin/following{/other_user}","gists_url":"https://api.github.com/users/justindujardin/gists{/gist_id}","starred_url":"https://api.github.com/users/justindujardin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justindujardin/subscriptions","organizations_url":"https://api.github.com/users/justindujardin/orgs","repos_url":"https://api.github.com/users/justindujardin/repos","events_url":"https://api.github.com/users/justindujardin/events{/privacy}","received_events_url":"https://api.github.com/users/justindujardin/received_events","type":"User","site_admin":false},"body":"# Problem\r\nrequestAnimationFrame is often called from within the callback function that is bound to its zone.  This results in every subsequent call to the same function creating and binding to a new zone.\r\n\r\n# Proposed Solution\r\nMaintain a simple reference count of function signatures given to requestAnimationFrame, and when the reference count is greater than 0 bind to to the parent zone rather than creating a new one.\r\n\r\nFeedback welcome.\r\n\r\nFixes: #143","created_at":"2015-07-17T01:18:21Z","updated_at":"2015-07-17T01:18:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/zone.js/pulls/147/commits","review_comments_url":"https://api.github.com/repos/angular/zone.js/pulls/147/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/147/comments","statuses_url":"https://api.github.com/repos/angular/zone.js/statuses/46d0f44eff787fe880b76b8d30f92062787594ad","head":{"label":"justindujardin:requestAnimationFrame","ref":"requestAnimationFrame","sha":"46d0f44eff787fe880b76b8d30f92062787594ad","user":{"login":"justindujardin","id":101493,"avatar_url":"https://avatars.githubusercontent.com/u/101493?v=3","gravatar_id":"","url":"https://api.github.com/users/justindujardin","html_url":"https://github.com/justindujardin","followers_url":"https://api.github.com/users/justindujardin/followers","following_url":"https://api.github.com/users/justindujardin/following{/other_user}","gists_url":"https://api.github.com/users/justindujardin/gists{/gist_id}","starred_url":"https://api.github.com/users/justindujardin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justindujardin/subscriptions","organizations_url":"https://api.github.com/users/justindujardin/orgs","repos_url":"https://api.github.com/users/justindujardin/repos","events_url":"https://api.github.com/users/justindujardin/events{/privacy}","received_events_url":"https://api.github.com/users/justindujardin/received_events","type":"User","site_admin":false},"repo":{"id":39226290,"name":"zone.js","full_name":"justindujardin/zone.js","owner":{"login":"justindujardin","id":101493,"avatar_url":"https://avatars.githubusercontent.com/u/101493?v=3","gravatar_id":"","url":"https://api.github.com/users/justindujardin","html_url":"https://github.com/justindujardin","followers_url":"https://api.github.com/users/justindujardin/followers","following_url":"https://api.github.com/users/justindujardin/following{/other_user}","gists_url":"https://api.github.com/users/justindujardin/gists{/gist_id}","starred_url":"https://api.github.com/users/justindujardin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justindujardin/subscriptions","organizations_url":"https://api.github.com/users/justindujardin/orgs","repos_url":"https://api.github.com/users/justindujardin/repos","events_url":"https://api.github.com/users/justindujardin/events{/privacy}","received_events_url":"https://api.github.com/users/justindujardin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/justindujardin/zone.js","description":"Implements Zones for JavaScript","fork":true,"url":"https://api.github.com/repos/justindujardin/zone.js","forks_url":"https://api.github.com/repos/justindujardin/zone.js/forks","keys_url":"https://api.github.com/repos/justindujardin/zone.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justindujardin/zone.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justindujardin/zone.js/teams","hooks_url":"https://api.github.com/repos/justindujardin/zone.js/hooks","issue_events_url":"https://api.github.com/repos/justindujardin/zone.js/issues/events{/number}","events_url":"https://api.github.com/repos/justindujardin/zone.js/events","assignees_url":"https://api.github.com/repos/justindujardin/zone.js/assignees{/user}","branches_url":"https://api.github.com/repos/justindujardin/zone.js/branches{/branch}","tags_url":"https://api.github.com/repos/justindujardin/zone.js/tags","blobs_url":"https://api.github.com/repos/justindujardin/zone.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justindujardin/zone.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justindujardin/zone.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/justindujardin/zone.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justindujardin/zone.js/statuses/{sha}","languages_url":"https://api.github.com/repos/justindujardin/zone.js/languages","stargazers_url":"https://api.github.com/repos/justindujardin/zone.js/stargazers","contributors_url":"https://api.github.com/repos/justindujardin/zone.js/contributors","subscribers_url":"https://api.github.com/repos/justindujardin/zone.js/subscribers","subscription_url":"https://api.github.com/repos/justindujardin/zone.js/subscription","commits_url":"https://api.github.com/repos/justindujardin/zone.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/justindujardin/zone.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/justindujardin/zone.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/justindujardin/zone.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/justindujardin/zone.js/contents/{+path}","compare_url":"https://api.github.com/repos/justindujardin/zone.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justindujardin/zone.js/merges","archive_url":"https://api.github.com/repos/justindujardin/zone.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justindujardin/zone.js/downloads","issues_url":"https://api.github.com/repos/justindujardin/zone.js/issues{/number}","pulls_url":"https://api.github.com/repos/justindujardin/zone.js/pulls{/number}","milestones_url":"https://api.github.com/repos/justindujardin/zone.js/milestones{/number}","notifications_url":"https://api.github.com/repos/justindujardin/zone.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justindujardin/zone.js/labels{/name}","releases_url":"https://api.github.com/repos/justindujardin/zone.js/releases{/id}","created_at":"2015-07-17T00:05:18Z","updated_at":"2015-07-17T00:05:18Z","pushed_at":"2015-07-17T01:06:30Z","git_url":"git://github.com/justindujardin/zone.js.git","ssh_url":"git@github.com:justindujardin/zone.js.git","clone_url":"https://github.com/justindujardin/zone.js.git","svn_url":"https://github.com/justindujardin/zone.js","homepage":"https://github.com/angular/zone.js","size":1522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"af88ff8a01c1d5b445eeb212569dde5a88c8e509","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}","created_at":"2013-12-27T06:08:07Z","updated_at":"2015-07-14T00:32:57Z","pushed_at":"2015-07-17T01:18:21Z","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":1522,"stargazers_count":774,"watchers_count":774,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":42,"forks":60,"open_issues":42,"watchers":774,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/zone.js/pulls/147"},"html":{"href":"https://github.com/angular/zone.js/pull/147"},"issue":{"href":"https://api.github.com/repos/angular/zone.js/issues/147"},"comments":{"href":"https://api.github.com/repos/angular/zone.js/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/zone.js/pulls/147/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/147/commits"},"statuses":{"href":"https://api.github.com/repos/angular/zone.js/statuses/46d0f44eff787fe880b76b8d30f92062787594ad"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":240,"deletions":69,"changed_files":7}}