{"action":"created","comment":{"url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments/155650640","pull_request_review_id":82005311,"id":155650640,"diff_hunk":"@@ -40,37 +41,48 @@ import {\n   removeSourcesFromTabList,\n   removeSourceFromTabList,\n   getTextSearchQuery,\n-  getActiveSearch\n+  getActiveSearch,\n+  getGeneratedSource\n } from \"../selectors\";\n \n import type { Source, Location } from \"../types\";\n import type { ThunkArgs } from \"./types\";\n-import type { State } from \"../reducers/types\";\n \n // If a request has been made to show this source, go ahead and\n // select it.\n-async function checkSelectedSource(state: State, dispatch, source) {\n-  const pendingLocation = getPendingSelectedLocation(state);\n+function checkSelectedSource(source) {\n+  return async ({ dispatch, getState }: ThunkArgs) => {\n+    const pendingLocation = getPendingSelectedLocation(getState());\n \n-  if (pendingLocation && !!source.url && pendingLocation.url === source.url) {\n-    await dispatch(selectLocation({ ...pendingLocation, sourceId: source.id }));\n-  }\n+    if (pendingLocation && !!source.url && pendingLocation.url === source.url) {\n+      await dispatch(\n+        selectLocation({ ...pendingLocation, sourceId: source.id })\n+      );\n+    }\n+  };\n }\n \n-async function checkPendingBreakpoints(state, dispatch, sourceId) {\n-  // source may have been modified by selectLocation\n-  const source = getSource(state, sourceId).toJS();\n-  const pendingBreakpoints = getPendingBreakpointsForSource(state, source.url);\n-  if (!pendingBreakpoints.size) {\n-    return;\n-  }\n-\n-  // load the source text if there is a pending breakpoint for it\n-  await dispatch(loadSourceText(source));\n-  const pendingBreakpointsArray = pendingBreakpoints.valueSeq().toJS();\n-  for (const pendingBreakpoint of pendingBreakpointsArray) {\n-    await dispatch(syncBreakpoint(sourceId, pendingBreakpoint));\n-  }\n+function checkPendingBreakpoints(sourceId) {\n+  return async ({ dispatch, getState }: ThunkArgs) => {\n+    // source may have been modified by selectLocation\n+    const source = getSource(getState(), sourceId).toJS();\n+\n+    const pendingBreakpoints = getPendingBreakpointsForSource(\n+      getState(),\n+      source.url\n+    );\n+\n+    if (!pendingBreakpoints.size) {\n+      return;\n+    }\n+\n+    await dispatch(loadSourceText(source));","path":"src/actions/sources.js","position":68,"original_position":68,"commit_id":"c2674896dfb7e823001660a101dcd59f02273aed","original_commit_id":"c2674896dfb7e823001660a101dcd59f02273aed","user":{"login":"jasonLaster","id":254562,"avatar_url":"https://avatars1.githubusercontent.com/u/254562?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonLaster","html_url":"https://github.com/jasonLaster","followers_url":"https://api.github.com/users/jasonLaster/followers","following_url":"https://api.github.com/users/jasonLaster/following{/other_user}","gists_url":"https://api.github.com/users/jasonLaster/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonLaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonLaster/subscriptions","organizations_url":"https://api.github.com/users/jasonLaster/orgs","repos_url":"https://api.github.com/users/jasonLaster/repos","events_url":"https://api.github.com/users/jasonLaster/events{/privacy}","received_events_url":"https://api.github.com/users/jasonLaster/received_events","type":"User","site_admin":false},"body":"glad you asked :) because pending breakpoints need the symbols to compute the ast locations. thus we need to load the file","created_at":"2017-12-07T21:47:33Z","updated_at":"2017-12-07T21:47:33Z","html_url":"https://github.com/devtools-html/debugger.html/pull/4802#discussion_r155650640","pull_request_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4802","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments/155650640"},"html":{"href":"https://github.com/devtools-html/debugger.html/pull/4802#discussion_r155650640"},"pull_request":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4802"}},"in_reply_to_id":155648322},"pull_request":{"url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4802","id":154860081,"html_url":"https://github.com/devtools-html/debugger.html/pull/4802","diff_url":"https://github.com/devtools-html/debugger.html/pull/4802.diff","patch_url":"https://github.com/devtools-html/debugger.html/pull/4802.patch","issue_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/4802","number":4802,"state":"open","locked":false,"title":"Do work in the background","user":{"login":"jasonLaster","id":254562,"avatar_url":"https://avatars1.githubusercontent.com/u/254562?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonLaster","html_url":"https://github.com/jasonLaster","followers_url":"https://api.github.com/users/jasonLaster/followers","following_url":"https://api.github.com/users/jasonLaster/following{/other_user}","gists_url":"https://api.github.com/users/jasonLaster/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonLaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonLaster/subscriptions","organizations_url":"https://api.github.com/users/jasonLaster/orgs","repos_url":"https://api.github.com/users/jasonLaster/repos","events_url":"https://api.github.com/users/jasonLaster/events{/privacy}","received_events_url":"https://api.github.com/users/jasonLaster/received_events","type":"User","site_admin":false},"body":"Associated Issue: #4705 \r\n\r\n### Summary of Changes\r\n\r\n* Removes await \r\n* moves loadSourceText to checkPendingBreakpoints (we might not need it at all)","created_at":"2017-11-27T16:46:08Z","updated_at":"2017-12-07T21:47:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7fb8e1b469a9c71563d4af00b2ab159e474d36a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"flodolo","id":3644868,"avatar_url":"https://avatars0.githubusercontent.com/u/3644868?v=4","gravatar_id":"","url":"https://api.github.com/users/flodolo","html_url":"https://github.com/flodolo","followers_url":"https://api.github.com/users/flodolo/followers","following_url":"https://api.github.com/users/flodolo/following{/other_user}","gists_url":"https://api.github.com/users/flodolo/gists{/gist_id}","starred_url":"https://api.github.com/users/flodolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flodolo/subscriptions","organizations_url":"https://api.github.com/users/flodolo/orgs","repos_url":"https://api.github.com/users/flodolo/repos","events_url":"https://api.github.com/users/flodolo/events{/privacy}","received_events_url":"https://api.github.com/users/flodolo/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4802/commits","review_comments_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4802/comments","review_comment_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments{/number}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/4802/comments","statuses_url":"https://api.github.com/repos/devtools-html/debugger.html/statuses/c2674896dfb7e823001660a101dcd59f02273aed","head":{"label":"jasonLaster:background","ref":"background","sha":"c2674896dfb7e823001660a101dcd59f02273aed","user":{"login":"jasonLaster","id":254562,"avatar_url":"https://avatars1.githubusercontent.com/u/254562?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonLaster","html_url":"https://github.com/jasonLaster","followers_url":"https://api.github.com/users/jasonLaster/followers","following_url":"https://api.github.com/users/jasonLaster/following{/other_user}","gists_url":"https://api.github.com/users/jasonLaster/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonLaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonLaster/subscriptions","organizations_url":"https://api.github.com/users/jasonLaster/orgs","repos_url":"https://api.github.com/users/jasonLaster/repos","events_url":"https://api.github.com/users/jasonLaster/events{/privacy}","received_events_url":"https://api.github.com/users/jasonLaster/received_events","type":"User","site_admin":false},"repo":{"id":55007537,"name":"debugger.html","full_name":"jasonLaster/debugger.html","owner":{"login":"jasonLaster","id":254562,"avatar_url":"https://avatars1.githubusercontent.com/u/254562?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonLaster","html_url":"https://github.com/jasonLaster","followers_url":"https://api.github.com/users/jasonLaster/followers","following_url":"https://api.github.com/users/jasonLaster/following{/other_user}","gists_url":"https://api.github.com/users/jasonLaster/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonLaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonLaster/subscriptions","organizations_url":"https://api.github.com/users/jasonLaster/orgs","repos_url":"https://api.github.com/users/jasonLaster/repos","events_url":"https://api.github.com/users/jasonLaster/events{/privacy}","received_events_url":"https://api.github.com/users/jasonLaster/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasonLaster/debugger.html","description":"Experimental something something.","fork":true,"url":"https://api.github.com/repos/jasonLaster/debugger.html","forks_url":"https://api.github.com/repos/jasonLaster/debugger.html/forks","keys_url":"https://api.github.com/repos/jasonLaster/debugger.html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasonLaster/debugger.html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasonLaster/debugger.html/teams","hooks_url":"https://api.github.com/repos/jasonLaster/debugger.html/hooks","issue_events_url":"https://api.github.com/repos/jasonLaster/debugger.html/issues/events{/number}","events_url":"https://api.github.com/repos/jasonLaster/debugger.html/events","assignees_url":"https://api.github.com/repos/jasonLaster/debugger.html/assignees{/user}","branches_url":"https://api.github.com/repos/jasonLaster/debugger.html/branches{/branch}","tags_url":"https://api.github.com/repos/jasonLaster/debugger.html/tags","blobs_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasonLaster/debugger.html/statuses/{sha}","languages_url":"https://api.github.com/repos/jasonLaster/debugger.html/languages","stargazers_url":"https://api.github.com/repos/jasonLaster/debugger.html/stargazers","contributors_url":"https://api.github.com/repos/jasonLaster/debugger.html/contributors","subscribers_url":"https://api.github.com/repos/jasonLaster/debugger.html/subscribers","subscription_url":"https://api.github.com/repos/jasonLaster/debugger.html/subscription","commits_url":"https://api.github.com/repos/jasonLaster/debugger.html/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasonLaster/debugger.html/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasonLaster/debugger.html/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasonLaster/debugger.html/contents/{+path}","compare_url":"https://api.github.com/repos/jasonLaster/debugger.html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasonLaster/debugger.html/merges","archive_url":"https://api.github.com/repos/jasonLaster/debugger.html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasonLaster/debugger.html/downloads","issues_url":"https://api.github.com/repos/jasonLaster/debugger.html/issues{/number}","pulls_url":"https://api.github.com/repos/jasonLaster/debugger.html/pulls{/number}","milestones_url":"https://api.github.com/repos/jasonLaster/debugger.html/milestones{/number}","notifications_url":"https://api.github.com/repos/jasonLaster/debugger.html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasonLaster/debugger.html/labels{/name}","releases_url":"https://api.github.com/repos/jasonLaster/debugger.html/releases{/id}","deployments_url":"https://api.github.com/repos/jasonLaster/debugger.html/deployments","created_at":"2016-03-29T20:14:57Z","updated_at":"2017-11-19T20:54:08Z","pushed_at":"2017-12-07T21:25:39Z","git_url":"git://github.com/jasonLaster/debugger.html.git","ssh_url":"git@github.com:jasonLaster/debugger.html.git","clone_url":"https://github.com/jasonLaster/debugger.html.git","svn_url":"https://github.com/jasonLaster/debugger.html","homepage":null,"size":28778,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":1,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"devtools-html:master","ref":"master","sha":"2cc6bb7c2f88d27fc861b87ba0163ca98a67c98d","user":{"login":"devtools-html","id":19979421,"avatar_url":"https://avatars2.githubusercontent.com/u/19979421?v=4","gravatar_id":"","url":"https://api.github.com/users/devtools-html","html_url":"https://github.com/devtools-html","followers_url":"https://api.github.com/users/devtools-html/followers","following_url":"https://api.github.com/users/devtools-html/following{/other_user}","gists_url":"https://api.github.com/users/devtools-html/gists{/gist_id}","starred_url":"https://api.github.com/users/devtools-html/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtools-html/subscriptions","organizations_url":"https://api.github.com/users/devtools-html/orgs","repos_url":"https://api.github.com/users/devtools-html/repos","events_url":"https://api.github.com/users/devtools-html/events{/privacy}","received_events_url":"https://api.github.com/users/devtools-html/received_events","type":"Organization","site_admin":false},"repo":{"id":54585418,"name":"debugger.html","full_name":"devtools-html/debugger.html","owner":{"login":"devtools-html","id":19979421,"avatar_url":"https://avatars2.githubusercontent.com/u/19979421?v=4","gravatar_id":"","url":"https://api.github.com/users/devtools-html","html_url":"https://github.com/devtools-html","followers_url":"https://api.github.com/users/devtools-html/followers","following_url":"https://api.github.com/users/devtools-html/following{/other_user}","gists_url":"https://api.github.com/users/devtools-html/gists{/gist_id}","starred_url":"https://api.github.com/users/devtools-html/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtools-html/subscriptions","organizations_url":"https://api.github.com/users/devtools-html/orgs","repos_url":"https://api.github.com/users/devtools-html/repos","events_url":"https://api.github.com/users/devtools-html/events{/privacy}","received_events_url":"https://api.github.com/users/devtools-html/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/devtools-html/debugger.html","description":"The Firefox debugger that works anywhere  :boom:","fork":false,"url":"https://api.github.com/repos/devtools-html/debugger.html","forks_url":"https://api.github.com/repos/devtools-html/debugger.html/forks","keys_url":"https://api.github.com/repos/devtools-html/debugger.html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devtools-html/debugger.html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devtools-html/debugger.html/teams","hooks_url":"https://api.github.com/repos/devtools-html/debugger.html/hooks","issue_events_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/events{/number}","events_url":"https://api.github.com/repos/devtools-html/debugger.html/events","assignees_url":"https://api.github.com/repos/devtools-html/debugger.html/assignees{/user}","branches_url":"https://api.github.com/repos/devtools-html/debugger.html/branches{/branch}","tags_url":"https://api.github.com/repos/devtools-html/debugger.html/tags","blobs_url":"https://api.github.com/repos/devtools-html/debugger.html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devtools-html/debugger.html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devtools-html/debugger.html/git/refs{/sha}","trees_url":"https://api.github.com/repos/devtools-html/debugger.html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devtools-html/debugger.html/statuses/{sha}","languages_url":"https://api.github.com/repos/devtools-html/debugger.html/languages","stargazers_url":"https://api.github.com/repos/devtools-html/debugger.html/stargazers","contributors_url":"https://api.github.com/repos/devtools-html/debugger.html/contributors","subscribers_url":"https://api.github.com/repos/devtools-html/debugger.html/subscribers","subscription_url":"https://api.github.com/repos/devtools-html/debugger.html/subscription","commits_url":"https://api.github.com/repos/devtools-html/debugger.html/commits{/sha}","git_commits_url":"https://api.github.com/repos/devtools-html/debugger.html/git/commits{/sha}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/comments{/number}","issue_comment_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/comments{/number}","contents_url":"https://api.github.com/repos/devtools-html/debugger.html/contents/{+path}","compare_url":"https://api.github.com/repos/devtools-html/debugger.html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devtools-html/debugger.html/merges","archive_url":"https://api.github.com/repos/devtools-html/debugger.html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devtools-html/debugger.html/downloads","issues_url":"https://api.github.com/repos/devtools-html/debugger.html/issues{/number}","pulls_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls{/number}","milestones_url":"https://api.github.com/repos/devtools-html/debugger.html/milestones{/number}","notifications_url":"https://api.github.com/repos/devtools-html/debugger.html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devtools-html/debugger.html/labels{/name}","releases_url":"https://api.github.com/repos/devtools-html/debugger.html/releases{/id}","deployments_url":"https://api.github.com/repos/devtools-html/debugger.html/deployments","created_at":"2016-03-23T18:55:36Z","updated_at":"2017-12-07T20:01:38Z","pushed_at":"2017-12-07T21:31:31Z","git_url":"git://github.com/devtools-html/debugger.html.git","ssh_url":"git@github.com:devtools-html/debugger.html.git","clone_url":"https://github.com/devtools-html/debugger.html.git","svn_url":"https://github.com/devtools-html/debugger.html","homepage":"https://devtools-html.github.io/debugger.html/","size":13520,"stargazers_count":3220,"watchers_count":3220,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":488,"mirror_url":null,"archived":false,"open_issues_count":248,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":488,"open_issues":248,"watchers":3220,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4802"},"html":{"href":"https://github.com/devtools-html/debugger.html/pull/4802"},"issue":{"href":"https://api.github.com/repos/devtools-html/debugger.html/issues/4802"},"comments":{"href":"https://api.github.com/repos/devtools-html/debugger.html/issues/4802/comments"},"review_comments":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4802/comments"},"review_comment":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4802/commits"},"statuses":{"href":"https://api.github.com/repos/devtools-html/debugger.html/statuses/c2674896dfb7e823001660a101dcd59f02273aed"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jasonLaster"}}