{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/comments/224721045","pull_request_review_id":164159580,"id":224721045,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDcyMTA0NQ==","diff_hunk":"@@ -495,7 +495,12 @@ class Page extends EventEmitter {\n   async _onConsoleAPI(event) {\n     const context = this._frameManager.executionContextById(event.executionContextId);\n     const values = event.args.map(arg => createJSHandle(context, arg));\n-    this._addConsoleMessage(event.type, values);\n+    let location;\n+    if (event.stackTrace && event.stackTrace.callFrames) {\n+      const {url, lineNumber, columnNumber} = event.stackTrace.callFrames[0];\n+      location = {url, lineNumber, columnNumber};","path":"lib/Page.js","position":22,"original_position":22,"commit_id":"cf52d458fc32e80c6698eccfc68075be4dfebbb5","original_commit_id":"05878a37c9a46b5395efe52e67ed33b15c4499b8","user":{"login":"tompere","id":2641321,"node_id":"MDQ6VXNlcjI2NDEzMjE=","avatar_url":"https://avatars1.githubusercontent.com/u/2641321?v=4","gravatar_id":"","url":"https://api.github.com/users/tompere","html_url":"https://github.com/tompere","followers_url":"https://api.github.com/users/tompere/followers","following_url":"https://api.github.com/users/tompere/following{/other_user}","gists_url":"https://api.github.com/users/tompere/gists{/gist_id}","starred_url":"https://api.github.com/users/tompere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tompere/subscriptions","organizations_url":"https://api.github.com/users/tompere/orgs","repos_url":"https://api.github.com/users/tompere/repos","events_url":"https://api.github.com/users/tompere/events{/privacy}","received_events_url":"https://api.github.com/users/tompere/received_events","type":"User","site_admin":false},"body":"just a clarification about how defensive puppeteer code should be:\r\n\r\nCan i rely on devtools protocol API for optional/mandatory return values?\r\ne.g.\r\n* [Runtime#type-CallFrame](https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-CallFrame) always return `{url, lineNumber, columnNumber}`.\r\n* [Runtime#event-consoleAPICalled](https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-consoleAPICalled) might not return `StackTrace`. But if returned, it will always return `Array{CallFrame}`.\r\n","created_at":"2018-10-12T09:13:59Z","updated_at":"2018-10-12T09:13:59Z","html_url":"https://github.com/GoogleChrome/puppeteer/pull/3365#discussion_r224721045","pull_request_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/3365","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/comments/224721045"},"html":{"href":"https://github.com/GoogleChrome/puppeteer/pull/3365#discussion_r224721045"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/3365"}},"in_reply_to_id":224573545},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/3365","id":221016967,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMDE2OTY3","html_url":"https://github.com/GoogleChrome/puppeteer/pull/3365","diff_url":"https://github.com/GoogleChrome/puppeteer/pull/3365.diff","patch_url":"https://github.com/GoogleChrome/puppeteer/pull/3365.patch","issue_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/3365","number":3365,"state":"open","locked":false,"title":"feat(Page): exposed additional info for ConsoleMessage object","user":{"login":"tompere","id":2641321,"node_id":"MDQ6VXNlcjI2NDEzMjE=","avatar_url":"https://avatars1.githubusercontent.com/u/2641321?v=4","gravatar_id":"","url":"https://api.github.com/users/tompere","html_url":"https://github.com/tompere","followers_url":"https://api.github.com/users/tompere/followers","following_url":"https://api.github.com/users/tompere/following{/other_user}","gists_url":"https://api.github.com/users/tompere/gists{/gist_id}","starred_url":"https://api.github.com/users/tompere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tompere/subscriptions","organizations_url":"https://api.github.com/users/tompere/orgs","repos_url":"https://api.github.com/users/tompere/repos","events_url":"https://api.github.com/users/tompere/events{/privacy}","received_events_url":"https://api.github.com/users/tompere/received_events","type":"User","site_admin":false},"body":"This patch add additional method to ConsoleMessage object sent on console event. Currently, added URL and line number to additionalInfo.\r\n\r\nFixes #3029","created_at":"2018-10-08T06:50:43Z","updated_at":"2018-10-12T09:13:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f46e6623246a4c30b584817bd1238eb12e620c1e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/3365/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/3365/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/3365/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/puppeteer/statuses/cf52d458fc32e80c6698eccfc68075be4dfebbb5","head":{"label":"tompere:fix-3029","ref":"fix-3029","sha":"cf52d458fc32e80c6698eccfc68075be4dfebbb5","user":{"login":"tompere","id":2641321,"node_id":"MDQ6VXNlcjI2NDEzMjE=","avatar_url":"https://avatars1.githubusercontent.com/u/2641321?v=4","gravatar_id":"","url":"https://api.github.com/users/tompere","html_url":"https://github.com/tompere","followers_url":"https://api.github.com/users/tompere/followers","following_url":"https://api.github.com/users/tompere/following{/other_user}","gists_url":"https://api.github.com/users/tompere/gists{/gist_id}","starred_url":"https://api.github.com/users/tompere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tompere/subscriptions","organizations_url":"https://api.github.com/users/tompere/orgs","repos_url":"https://api.github.com/users/tompere/repos","events_url":"https://api.github.com/users/tompere/events{/privacy}","received_events_url":"https://api.github.com/users/tompere/received_events","type":"User","site_admin":false},"repo":{"id":152025874,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIwMjU4NzQ=","name":"puppeteer","full_name":"tompere/puppeteer","private":false,"owner":{"login":"tompere","id":2641321,"node_id":"MDQ6VXNlcjI2NDEzMjE=","avatar_url":"https://avatars1.githubusercontent.com/u/2641321?v=4","gravatar_id":"","url":"https://api.github.com/users/tompere","html_url":"https://github.com/tompere","followers_url":"https://api.github.com/users/tompere/followers","following_url":"https://api.github.com/users/tompere/following{/other_user}","gists_url":"https://api.github.com/users/tompere/gists{/gist_id}","starred_url":"https://api.github.com/users/tompere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tompere/subscriptions","organizations_url":"https://api.github.com/users/tompere/orgs","repos_url":"https://api.github.com/users/tompere/repos","events_url":"https://api.github.com/users/tompere/events{/privacy}","received_events_url":"https://api.github.com/users/tompere/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tompere/puppeteer","description":"Headless Chrome Node API","fork":true,"url":"https://api.github.com/repos/tompere/puppeteer","forks_url":"https://api.github.com/repos/tompere/puppeteer/forks","keys_url":"https://api.github.com/repos/tompere/puppeteer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tompere/puppeteer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tompere/puppeteer/teams","hooks_url":"https://api.github.com/repos/tompere/puppeteer/hooks","issue_events_url":"https://api.github.com/repos/tompere/puppeteer/issues/events{/number}","events_url":"https://api.github.com/repos/tompere/puppeteer/events","assignees_url":"https://api.github.com/repos/tompere/puppeteer/assignees{/user}","branches_url":"https://api.github.com/repos/tompere/puppeteer/branches{/branch}","tags_url":"https://api.github.com/repos/tompere/puppeteer/tags","blobs_url":"https://api.github.com/repos/tompere/puppeteer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tompere/puppeteer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tompere/puppeteer/git/refs{/sha}","trees_url":"https://api.github.com/repos/tompere/puppeteer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tompere/puppeteer/statuses/{sha}","languages_url":"https://api.github.com/repos/tompere/puppeteer/languages","stargazers_url":"https://api.github.com/repos/tompere/puppeteer/stargazers","contributors_url":"https://api.github.com/repos/tompere/puppeteer/contributors","subscribers_url":"https://api.github.com/repos/tompere/puppeteer/subscribers","subscription_url":"https://api.github.com/repos/tompere/puppeteer/subscription","commits_url":"https://api.github.com/repos/tompere/puppeteer/commits{/sha}","git_commits_url":"https://api.github.com/repos/tompere/puppeteer/git/commits{/sha}","comments_url":"https://api.github.com/repos/tompere/puppeteer/comments{/number}","issue_comment_url":"https://api.github.com/repos/tompere/puppeteer/issues/comments{/number}","contents_url":"https://api.github.com/repos/tompere/puppeteer/contents/{+path}","compare_url":"https://api.github.com/repos/tompere/puppeteer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tompere/puppeteer/merges","archive_url":"https://api.github.com/repos/tompere/puppeteer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tompere/puppeteer/downloads","issues_url":"https://api.github.com/repos/tompere/puppeteer/issues{/number}","pulls_url":"https://api.github.com/repos/tompere/puppeteer/pulls{/number}","milestones_url":"https://api.github.com/repos/tompere/puppeteer/milestones{/number}","notifications_url":"https://api.github.com/repos/tompere/puppeteer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tompere/puppeteer/labels{/name}","releases_url":"https://api.github.com/repos/tompere/puppeteer/releases{/id}","deployments_url":"https://api.github.com/repos/tompere/puppeteer/deployments","created_at":"2018-10-08T05:59:54Z","updated_at":"2018-10-08T05:59:57Z","pushed_at":"2018-10-11T19:23:17Z","git_url":"git://github.com/tompere/puppeteer.git","ssh_url":"git@github.com:tompere/puppeteer.git","clone_url":"https://github.com/tompere/puppeteer.git","svn_url":"https://github.com/tompere/puppeteer","homepage":"https://pptr.dev","size":4442,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"a04dedcaf831b69a7e375bf4442d91ba06bb20a1","user":{"login":"GoogleChrome","id":1778935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzg5MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1778935?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":90796663,"node_id":"MDEwOlJlcG9zaXRvcnk5MDc5NjY2Mw==","name":"puppeteer","full_name":"GoogleChrome/puppeteer","private":false,"owner":{"login":"GoogleChrome","id":1778935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzg5MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1778935?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GoogleChrome/puppeteer","description":"Headless Chrome Node API","fork":false,"url":"https://api.github.com/repos/GoogleChrome/puppeteer","forks_url":"https://api.github.com/repos/GoogleChrome/puppeteer/forks","keys_url":"https://api.github.com/repos/GoogleChrome/puppeteer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/puppeteer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/puppeteer/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/puppeteer/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/puppeteer/events","assignees_url":"https://api.github.com/repos/GoogleChrome/puppeteer/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/puppeteer/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/puppeteer/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/puppeteer/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/puppeteer/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/puppeteer/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/puppeteer/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/puppeteer/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/puppeteer/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/puppeteer/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/puppeteer/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/puppeteer/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/puppeteer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/puppeteer/merges","archive_url":"https://api.github.com/repos/GoogleChrome/puppeteer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/puppeteer/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/puppeteer/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/puppeteer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/puppeteer/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/puppeteer/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/deployments","created_at":"2017-05-09T22:16:13Z","updated_at":"2018-10-12T08:59:03Z","pushed_at":"2018-10-12T02:13:58Z","git_url":"git://github.com/GoogleChrome/puppeteer.git","ssh_url":"git@github.com:GoogleChrome/puppeteer.git","clone_url":"https://github.com/GoogleChrome/puppeteer.git","svn_url":"https://github.com/GoogleChrome/puppeteer","homepage":"https://pptr.dev","size":4448,"stargazers_count":39428,"watchers_count":39428,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3300,"mirror_url":null,"archived":false,"open_issues_count":265,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3300,"open_issues":265,"watchers":39428,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/3365"},"html":{"href":"https://github.com/GoogleChrome/puppeteer/pull/3365"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/3365"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/3365/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/3365/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/pulls/3365/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/puppeteer/statuses/cf52d458fc32e80c6698eccfc68075be4dfebbb5"}},"author_association":"NONE"}}
{"actor":{"display_login":"tompere"}}