{"action":"created","comment":{"url":"https://api.github.com/repos/w3c/webrtc-pc/pulls/comments/33173193","id":33173193,"diff_hunk":"@@ -3849,29 +3888,21 @@ <h2 id=\"sec.stats-model\">Statistics Model</h2>\n       interface as described below.</p>\n \n       <dl class=\"idl\" title=\"partial interface RTCPeerConnection\">\n-        <dt>void getStats(MediaStreamTrack? selector, RTCStatsCallback\n-        successCallback, RTCPeerConnectionErrorCallback failureCallback)</dt>\n+        <dt>Promise&lt;RTCStatsReport&gt; getStats(\n+          optional MediaStreamTrack? selector)</dt>\n \n         <dd>\n           <p>Gathers stats for the given <a href=\"#stats-selector\">selector</a>\n           and reports the result asynchronously.</p>\n \n           <p>When the <dfn id=\n-          \"dom-peerconnection-getstats\"><code>getStats()</code></dfn> method is\n-          invoked, the user agent MUST queue a task to run the following\n-          steps:</p>\n+          \"#widl-RTCPeerConnection-getStats-Promise-RTCStatsReport--MediaStreamTrack-selector\">\n+            <code>getStats()</code></dfn> method is\n+          invoked, the user agent MUST run the following steps:</p>\n \n           <ol>\n             <li>\n-              <p>If the <code><a>RTCPeerConnection</a></code> object's <a href=\n-              \"#dom-peerconnection-signaling-state\"><code>RTCPeerConnection</code>\n-              signalingState</a> is <code>closed</code>, throw an\n-              <code>InvalidStateError</code> exception.</p>\n-            </li>","path":"webrtc.html","position":82,"original_position":82,"commit_id":"9528b056dfea08763592009ea2a1f6dbbd3f8f91","original_commit_id":"9528b056dfea08763592009ea2a1f6dbbd3f8f91","user":{"login":"jan-ivar","id":3136226,"avatar_url":"https://avatars.githubusercontent.com/u/3136226?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-ivar","html_url":"https://github.com/jan-ivar","followers_url":"https://api.github.com/users/jan-ivar/followers","following_url":"https://api.github.com/users/jan-ivar/following{/other_user}","gists_url":"https://api.github.com/users/jan-ivar/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-ivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-ivar/subscriptions","organizations_url":"https://api.github.com/users/jan-ivar/orgs","repos_url":"https://api.github.com/users/jan-ivar/repos","events_url":"https://api.github.com/users/jan-ivar/events{/privacy}","received_events_url":"https://api.github.com/users/jan-ivar/received_events","type":"User","site_admin":false},"body":"Yes, see https://github.com/w3c/webrtc-stats/issues/3","created_at":"2015-06-24T17:32:39Z","updated_at":"2015-06-24T17:32:39Z","html_url":"https://github.com/w3c/webrtc-pc/pull/235#discussion_r33173193","pull_request_url":"https://api.github.com/repos/w3c/webrtc-pc/pulls/235","_links":{"self":{"href":"https://api.github.com/repos/w3c/webrtc-pc/pulls/comments/33173193"},"html":{"href":"https://github.com/w3c/webrtc-pc/pull/235#discussion_r33173193"},"pull_request":{"href":"https://api.github.com/repos/w3c/webrtc-pc/pulls/235"}}},"pull_request":{"url":"https://api.github.com/repos/w3c/webrtc-pc/pulls/235","id":36548306,"html_url":"https://github.com/w3c/webrtc-pc/pull/235","diff_url":"https://github.com/w3c/webrtc-pc/pull/235.diff","patch_url":"https://github.com/w3c/webrtc-pc/pull/235.patch","issue_url":"https://api.github.com/repos/w3c/webrtc-pc/issues/235","number":235,"state":"open","locked":false,"title":"Modernize getStats.","user":{"login":"jan-ivar","id":3136226,"avatar_url":"https://avatars.githubusercontent.com/u/3136226?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-ivar","html_url":"https://github.com/jan-ivar","followers_url":"https://api.github.com/users/jan-ivar/followers","following_url":"https://api.github.com/users/jan-ivar/following{/other_user}","gists_url":"https://api.github.com/users/jan-ivar/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-ivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-ivar/subscriptions","organizations_url":"https://api.github.com/users/jan-ivar/orgs","repos_url":"https://api.github.com/users/jan-ivar/repos","events_url":"https://api.github.com/users/jan-ivar/events{/privacy}","received_events_url":"https://api.github.com/users/jan-ivar/received_events","type":"User","site_admin":false},"body":"We didn't do getStats when we added promises to the spec, which seems like an oversight.\r\n\r\nI've heard rumors since last year that getStats is moving - https://github.com/w3c/webrtc-stats/issues/3 - but it's still here and an eye-sore, so here's a PR to update it to promises like the others. If it is moving, consider this a poke. ;)\r\n\r\nDisclaimer: This section appears not to have been updated in a while, so I had to take some liberties with the language (e.g. I believe `TypeError` is the current thinking on invalid parameters rather than the non-existent `InvalidParameters`?)","created_at":"2015-05-29T21:52:00Z","updated_at":"2015-06-24T17:32:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d723645ca16ae0fdae1d6f8dfa716f6c7847fe49","assignee":{"login":"burnburn","id":1171027,"avatar_url":"https://avatars.githubusercontent.com/u/1171027?v=3","gravatar_id":"","url":"https://api.github.com/users/burnburn","html_url":"https://github.com/burnburn","followers_url":"https://api.github.com/users/burnburn/followers","following_url":"https://api.github.com/users/burnburn/following{/other_user}","gists_url":"https://api.github.com/users/burnburn/gists{/gist_id}","starred_url":"https://api.github.com/users/burnburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burnburn/subscriptions","organizations_url":"https://api.github.com/users/burnburn/orgs","repos_url":"https://api.github.com/users/burnburn/repos","events_url":"https://api.github.com/users/burnburn/events{/privacy}","received_events_url":"https://api.github.com/users/burnburn/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/w3c/webrtc-pc/pulls/235/commits","review_comments_url":"https://api.github.com/repos/w3c/webrtc-pc/pulls/235/comments","review_comment_url":"https://api.github.com/repos/w3c/webrtc-pc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/w3c/webrtc-pc/issues/235/comments","statuses_url":"https://api.github.com/repos/w3c/webrtc-pc/statuses/9528b056dfea08763592009ea2a1f6dbbd3f8f91","head":{"label":"jan-ivar:getstats","ref":"getstats","sha":"9528b056dfea08763592009ea2a1f6dbbd3f8f91","user":{"login":"jan-ivar","id":3136226,"avatar_url":"https://avatars.githubusercontent.com/u/3136226?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-ivar","html_url":"https://github.com/jan-ivar","followers_url":"https://api.github.com/users/jan-ivar/followers","following_url":"https://api.github.com/users/jan-ivar/following{/other_user}","gists_url":"https://api.github.com/users/jan-ivar/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-ivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-ivar/subscriptions","organizations_url":"https://api.github.com/users/jan-ivar/orgs","repos_url":"https://api.github.com/users/jan-ivar/repos","events_url":"https://api.github.com/users/jan-ivar/events{/privacy}","received_events_url":"https://api.github.com/users/jan-ivar/received_events","type":"User","site_admin":false},"repo":{"id":25824693,"name":"webrtc-pc","full_name":"jan-ivar/webrtc-pc","owner":{"login":"jan-ivar","id":3136226,"avatar_url":"https://avatars.githubusercontent.com/u/3136226?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-ivar","html_url":"https://github.com/jan-ivar","followers_url":"https://api.github.com/users/jan-ivar/followers","following_url":"https://api.github.com/users/jan-ivar/following{/other_user}","gists_url":"https://api.github.com/users/jan-ivar/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-ivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-ivar/subscriptions","organizations_url":"https://api.github.com/users/jan-ivar/orgs","repos_url":"https://api.github.com/users/jan-ivar/repos","events_url":"https://api.github.com/users/jan-ivar/events{/privacy}","received_events_url":"https://api.github.com/users/jan-ivar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jan-ivar/webrtc-pc","description":"WebRTC 1.0 API","fork":true,"url":"https://api.github.com/repos/jan-ivar/webrtc-pc","forks_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/forks","keys_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/teams","hooks_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/hooks","issue_events_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/issues/events{/number}","events_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/events","assignees_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/assignees{/user}","branches_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/branches{/branch}","tags_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/tags","blobs_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/git/refs{/sha}","trees_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/statuses/{sha}","languages_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/languages","stargazers_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/stargazers","contributors_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/contributors","subscribers_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/subscribers","subscription_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/subscription","commits_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/commits{/sha}","git_commits_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/git/commits{/sha}","comments_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/comments{/number}","issue_comment_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/issues/comments{/number}","contents_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/contents/{+path}","compare_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/merges","archive_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/downloads","issues_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/issues{/number}","pulls_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/pulls{/number}","milestones_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/milestones{/number}","notifications_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/labels{/name}","releases_url":"https://api.github.com/repos/jan-ivar/webrtc-pc/releases{/id}","created_at":"2014-10-27T15:08:06Z","updated_at":"2014-10-07T10:20:34Z","pushed_at":"2015-06-15T05:24:35Z","git_url":"git://github.com/jan-ivar/webrtc-pc.git","ssh_url":"git@github.com:jan-ivar/webrtc-pc.git","clone_url":"https://github.com/jan-ivar/webrtc-pc.git","svn_url":"https://github.com/jan-ivar/webrtc-pc","homepage":null,"size":14855,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"w3c:master","ref":"master","sha":"27609a94f1302848f391620cb20b21e3b78d8a11","user":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":23384500,"name":"webrtc-pc","full_name":"w3c/webrtc-pc","owner":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/webrtc-pc","description":"WebRTC 1.0 API","fork":false,"url":"https://api.github.com/repos/w3c/webrtc-pc","forks_url":"https://api.github.com/repos/w3c/webrtc-pc/forks","keys_url":"https://api.github.com/repos/w3c/webrtc-pc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/webrtc-pc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/webrtc-pc/teams","hooks_url":"https://api.github.com/repos/w3c/webrtc-pc/hooks","issue_events_url":"https://api.github.com/repos/w3c/webrtc-pc/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/webrtc-pc/events","assignees_url":"https://api.github.com/repos/w3c/webrtc-pc/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/webrtc-pc/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/webrtc-pc/tags","blobs_url":"https://api.github.com/repos/w3c/webrtc-pc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/webrtc-pc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/webrtc-pc/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/webrtc-pc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/webrtc-pc/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/webrtc-pc/languages","stargazers_url":"https://api.github.com/repos/w3c/webrtc-pc/stargazers","contributors_url":"https://api.github.com/repos/w3c/webrtc-pc/contributors","subscribers_url":"https://api.github.com/repos/w3c/webrtc-pc/subscribers","subscription_url":"https://api.github.com/repos/w3c/webrtc-pc/subscription","commits_url":"https://api.github.com/repos/w3c/webrtc-pc/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/webrtc-pc/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/webrtc-pc/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/webrtc-pc/issues/comments{/number}","contents_url":"https://api.github.com/repos/w3c/webrtc-pc/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/webrtc-pc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/webrtc-pc/merges","archive_url":"https://api.github.com/repos/w3c/webrtc-pc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/webrtc-pc/downloads","issues_url":"https://api.github.com/repos/w3c/webrtc-pc/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/webrtc-pc/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/webrtc-pc/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/webrtc-pc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/webrtc-pc/labels{/name}","releases_url":"https://api.github.com/repos/w3c/webrtc-pc/releases{/id}","created_at":"2014-08-27T09:39:00Z","updated_at":"2015-06-15T11:41:33Z","pushed_at":"2015-06-24T17:08:03Z","git_url":"git://github.com/w3c/webrtc-pc.git","ssh_url":"git@github.com:w3c/webrtc-pc.git","clone_url":"https://github.com/w3c/webrtc-pc.git","svn_url":"https://github.com/w3c/webrtc-pc","homepage":null,"size":16482,"stargazers_count":35,"watchers_count":35,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":22,"mirror_url":null,"open_issues_count":42,"forks":22,"open_issues":42,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/w3c/webrtc-pc/pulls/235"},"html":{"href":"https://github.com/w3c/webrtc-pc/pull/235"},"issue":{"href":"https://api.github.com/repos/w3c/webrtc-pc/issues/235"},"comments":{"href":"https://api.github.com/repos/w3c/webrtc-pc/issues/235/comments"},"review_comments":{"href":"https://api.github.com/repos/w3c/webrtc-pc/pulls/235/comments"},"review_comment":{"href":"https://api.github.com/repos/w3c/webrtc-pc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/w3c/webrtc-pc/pulls/235/commits"},"statuses":{"href":"https://api.github.com/repos/w3c/webrtc-pc/statuses/9528b056dfea08763592009ea2a1f6dbbd3f8f91"}}}}