{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/61193405","id":61193405,"diff_hunk":"@@ -86,6 +90,31 @@ class DriverBase {\n     return Promise.reject(new Error('Not implemented'));\n   }\n \n+  evaluateAsync(asyncExpression) {\n+    return new Promise((resolve, reject) => {\n+      let asyncTimeout;\n+\n+      // Inject the call to capture inspection.\n+      const expression = `(function() {var __inspect = inspect;${asyncExpression}})()`;\n+\n+      this.on('Runtime.inspectRequested', value => {\n+        if (asyncTimeout !== undefined) {\n+          clearTimeout(asyncTimeout);\n+        }\n+        return resolve(value);\n+      });\n+\n+      this.sendCommand('Runtime.evaluate', {\n+        expression,\n+        includeCommandLineAPI: true,\n+        returnByValue: false","path":"src/lib/drivers/driver.js","position":32,"original_position":32,"commit_id":"ff9d04cbdbe86d666afdadf0d2995af49c4c646a","original_commit_id":"ff9d04cbdbe86d666afdadf0d2995af49c4c646a","user":{"login":"paulirish","id":39191,"avatar_url":"https://avatars.githubusercontent.com/u/39191?v=3","gravatar_id":"","url":"https://api.github.com/users/paulirish","html_url":"https://github.com/paulirish","followers_url":"https://api.github.com/users/paulirish/followers","following_url":"https://api.github.com/users/paulirish/following{/other_user}","gists_url":"https://api.github.com/users/paulirish/gists{/gist_id}","starred_url":"https://api.github.com/users/paulirish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulirish/subscriptions","organizations_url":"https://api.github.com/users/paulirish/orgs","repos_url":"https://api.github.com/users/paulirish/repos","events_url":"https://api.github.com/users/paulirish/events{/privacy}","received_events_url":"https://api.github.com/users/paulirish/received_events","type":"User","site_admin":false},"body":"in my tests, returnbyvalue wasn't neccessary, so yeah.","created_at":"2016-04-27T01:52:02Z","updated_at":"2016-04-27T01:52:02Z","html_url":"https://github.com/GoogleChrome/lighthouse/pull/247#discussion_r61193405","pull_request_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/247","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/61193405"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/247#discussion_r61193405"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/247"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/247","id":67684048,"html_url":"https://github.com/GoogleChrome/lighthouse/pull/247","diff_url":"https://github.com/GoogleChrome/lighthouse/pull/247.diff","patch_url":"https://github.com/GoogleChrome/lighthouse/pull/247.patch","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/247","number":247,"state":"open","locked":false,"title":"Adds async evaluation to driver.","user":{"login":"paullewis","id":617438,"avatar_url":"https://avatars.githubusercontent.com/u/617438?v=3","gravatar_id":"","url":"https://api.github.com/users/paullewis","html_url":"https://github.com/paullewis","followers_url":"https://api.github.com/users/paullewis/followers","following_url":"https://api.github.com/users/paullewis/following{/other_user}","gists_url":"https://api.github.com/users/paullewis/gists{/gist_id}","starred_url":"https://api.github.com/users/paullewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paullewis/subscriptions","organizations_url":"https://api.github.com/users/paullewis/orgs","repos_url":"https://api.github.com/users/paullewis/repos","events_url":"https://api.github.com/users/paullewis/events{/privacy}","received_events_url":"https://api.github.com/users/paullewis/received_events","type":"User","site_admin":false},"body":"Fixes #217 ","created_at":"2016-04-25T08:48:28Z","updated_at":"2016-04-27T01:52:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4306372da5b3d3db705ee5f72f03508494588be","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/247/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/247/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/247/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/ff9d04cbdbe86d666afdadf0d2995af49c4c646a","head":{"label":"paullewis:evalasync","ref":"evalasync","sha":"ff9d04cbdbe86d666afdadf0d2995af49c4c646a","user":{"login":"paullewis","id":617438,"avatar_url":"https://avatars.githubusercontent.com/u/617438?v=3","gravatar_id":"","url":"https://api.github.com/users/paullewis","html_url":"https://github.com/paullewis","followers_url":"https://api.github.com/users/paullewis/followers","following_url":"https://api.github.com/users/paullewis/following{/other_user}","gists_url":"https://api.github.com/users/paullewis/gists{/gist_id}","starred_url":"https://api.github.com/users/paullewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paullewis/subscriptions","organizations_url":"https://api.github.com/users/paullewis/orgs","repos_url":"https://api.github.com/users/paullewis/repos","events_url":"https://api.github.com/users/paullewis/events{/privacy}","received_events_url":"https://api.github.com/users/paullewis/received_events","type":"User","site_admin":false},"repo":{"id":54384726,"name":"lighthouse","full_name":"paullewis/lighthouse","owner":{"login":"paullewis","id":617438,"avatar_url":"https://avatars.githubusercontent.com/u/617438?v=3","gravatar_id":"","url":"https://api.github.com/users/paullewis","html_url":"https://github.com/paullewis","followers_url":"https://api.github.com/users/paullewis/followers","following_url":"https://api.github.com/users/paullewis/following{/other_user}","gists_url":"https://api.github.com/users/paullewis/gists{/gist_id}","starred_url":"https://api.github.com/users/paullewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paullewis/subscriptions","organizations_url":"https://api.github.com/users/paullewis/orgs","repos_url":"https://api.github.com/users/paullewis/repos","events_url":"https://api.github.com/users/paullewis/events{/privacy}","received_events_url":"https://api.github.com/users/paullewis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paullewis/lighthouse","description":null,"fork":true,"url":"https://api.github.com/repos/paullewis/lighthouse","forks_url":"https://api.github.com/repos/paullewis/lighthouse/forks","keys_url":"https://api.github.com/repos/paullewis/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paullewis/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paullewis/lighthouse/teams","hooks_url":"https://api.github.com/repos/paullewis/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/paullewis/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/paullewis/lighthouse/events","assignees_url":"https://api.github.com/repos/paullewis/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/paullewis/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/paullewis/lighthouse/tags","blobs_url":"https://api.github.com/repos/paullewis/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paullewis/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paullewis/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/paullewis/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paullewis/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/paullewis/lighthouse/languages","stargazers_url":"https://api.github.com/repos/paullewis/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/paullewis/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/paullewis/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/paullewis/lighthouse/subscription","commits_url":"https://api.github.com/repos/paullewis/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/paullewis/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/paullewis/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/paullewis/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/paullewis/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/paullewis/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paullewis/lighthouse/merges","archive_url":"https://api.github.com/repos/paullewis/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paullewis/lighthouse/downloads","issues_url":"https://api.github.com/repos/paullewis/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/paullewis/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/paullewis/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/paullewis/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paullewis/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/paullewis/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/paullewis/lighthouse/deployments","created_at":"2016-03-21T11:54:00Z","updated_at":"2016-03-21T11:54:01Z","pushed_at":"2016-04-26T16:06:54Z","git_url":"git://github.com/paullewis/lighthouse.git","ssh_url":"git@github.com:paullewis/lighthouse.git","clone_url":"https://github.com/paullewis/lighthouse.git","svn_url":"https://github.com/paullewis/lighthouse","homepage":null,"size":2738,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"36e0cd0aa800f3718f21e170b5b170de304a6c44","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","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":53370988,"name":"lighthouse","full_name":"GoogleChrome/lighthouse","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","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},"private":false,"html_url":"https://github.com/GoogleChrome/lighthouse","description":null,"fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2016-04-26T21:57:48Z","pushed_at":"2016-04-26T18:11:09Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":null,"size":5869,"stargazers_count":80,"watchers_count":80,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":26,"forks":16,"open_issues":26,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/247"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/247"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/247"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/247/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/247/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/247/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/ff9d04cbdbe86d666afdadf0d2995af49c4c646a"}}}}