{"action":"created","comment":{"url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/comments/58628173","id":58628173,"diff_hunk":"@@ -140,41 +120,25 @@ function lazyLoadCast () {\n   return Cast\n }\n \n-// Load the WebTorrent module, connect to both the WebTorrent and BitTorrent\n-// networks, resume torrents, start monitoring torrent progress\n+// Talk to WebTorrent process, resume torrents, start monitoring torrent progress\n function initWebtorrent () {\n-  WebTorrent = require('webtorrent')\n-\n-  // Connect to the WebTorrent and BitTorrent networks. WebTorrent Desktop is a hybrid\n-  // client, as explained here: https://webtorrent.io/faq\n-  state.client = new WebTorrent()\n-  state.client.on('warning', onWarning)\n-  state.client.on('error', function (err) {\n-    // TODO: WebTorrent should have semantic errors\n-    if (err.message.startsWith('There is already a swarm')) {\n-      onError(new Error('Couldn\\'t add duplicate torrent'))\n-    } else {\n-      onError(err)\n-    }\n-  })\n-\n   // Restart everything we were torrenting last time the app ran\n   resumeTorrents()\n \n   // Calling update() updates the UI given the current state\n   // Do this at least once a second to give  every file in every torrentSummary\n   // a progress bar and to keep the cursor in sync when playing a video\n-  setInterval(function () {\n-    if (!updateTorrentProgress()) {\n-      update() // If we didn't just update(), do so now, for the video cursor\n-    }\n-  }, 1000)\n+  setInterval(update, 1000)\n }\n \n // This is the (mostly) pure function from state -> UI. Returns a virtual DOM\n // tree. Any events, such as button clicks, will turn into calls to dispatch()\n function render (state) {\n-  return App(state)\n+  try {\n+    return App(state)","path":"renderer/index.js","position":112,"original_position":112,"commit_id":"e90d2591a656a5153dbf91092361a2435658f02a","original_commit_id":"e90d2591a656a5153dbf91092361a2435658f02a","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"body":"Does this prevent main-loop from complaining when there's an exception in the view code?","created_at":"2016-04-05T22:58:32Z","updated_at":"2016-04-05T22:58:32Z","html_url":"https://github.com/feross/webtorrent-desktop/pull/299#discussion_r58628173","pull_request_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/299","_links":{"self":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/comments/58628173"},"html":{"href":"https://github.com/feross/webtorrent-desktop/pull/299#discussion_r58628173"},"pull_request":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/299"}}},"pull_request":{"url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/299","id":65259500,"html_url":"https://github.com/feross/webtorrent-desktop/pull/299","diff_url":"https://github.com/feross/webtorrent-desktop/pull/299.diff","patch_url":"https://github.com/feross/webtorrent-desktop/pull/299.patch","issue_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/299","number":299,"state":"open","locked":false,"title":"Move WebTorrent to its own process","user":{"login":"dcposch","id":169280,"avatar_url":"https://avatars.githubusercontent.com/u/169280?v=3","gravatar_id":"","url":"https://api.github.com/users/dcposch","html_url":"https://github.com/dcposch","followers_url":"https://api.github.com/users/dcposch/followers","following_url":"https://api.github.com/users/dcposch/following{/other_user}","gists_url":"https://api.github.com/users/dcposch/gists{/gist_id}","starred_url":"https://api.github.com/users/dcposch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcposch/subscriptions","organizations_url":"https://api.github.com/users/dcposch/orgs","repos_url":"https://api.github.com/users/dcposch/repos","events_url":"https://api.github.com/users/dcposch/events{/privacy}","received_events_url":"https://api.github.com/users/dcposch/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-05T06:59:15Z","updated_at":"2016-04-05T22:58:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b83d21998f1b8c14b9d13fe1a6d79a392626297","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/299/commits","review_comments_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/299/comments","review_comment_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/299/comments","statuses_url":"https://api.github.com/repos/feross/webtorrent-desktop/statuses/e90d2591a656a5153dbf91092361a2435658f02a","head":{"label":"feross:dc/process","ref":"dc/process","sha":"e90d2591a656a5153dbf91092361a2435658f02a","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"repo":{"id":35015575,"name":"webtorrent-desktop","full_name":"feross/webtorrent-desktop","owner":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/feross/webtorrent-desktop","description":":rocket: WebTorrent, the streaming torrent client. For OS X, Windows, and Linux.","fork":false,"url":"https://api.github.com/repos/feross/webtorrent-desktop","forks_url":"https://api.github.com/repos/feross/webtorrent-desktop/forks","keys_url":"https://api.github.com/repos/feross/webtorrent-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feross/webtorrent-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feross/webtorrent-desktop/teams","hooks_url":"https://api.github.com/repos/feross/webtorrent-desktop/hooks","issue_events_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/feross/webtorrent-desktop/events","assignees_url":"https://api.github.com/repos/feross/webtorrent-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/feross/webtorrent-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/feross/webtorrent-desktop/tags","blobs_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feross/webtorrent-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/feross/webtorrent-desktop/languages","stargazers_url":"https://api.github.com/repos/feross/webtorrent-desktop/stargazers","contributors_url":"https://api.github.com/repos/feross/webtorrent-desktop/contributors","subscribers_url":"https://api.github.com/repos/feross/webtorrent-desktop/subscribers","subscription_url":"https://api.github.com/repos/feross/webtorrent-desktop/subscription","commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/feross/webtorrent-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/feross/webtorrent-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/feross/webtorrent-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feross/webtorrent-desktop/merges","archive_url":"https://api.github.com/repos/feross/webtorrent-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feross/webtorrent-desktop/downloads","issues_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/feross/webtorrent-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/feross/webtorrent-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feross/webtorrent-desktop/labels{/name}","releases_url":"https://api.github.com/repos/feross/webtorrent-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/feross/webtorrent-desktop/deployments","created_at":"2015-05-04T05:21:35Z","updated_at":"2016-04-05T12:50:45Z","pushed_at":"2016-04-05T22:19:24Z","git_url":"git://github.com/feross/webtorrent-desktop.git","ssh_url":"git@github.com:feross/webtorrent-desktop.git","clone_url":"https://github.com/feross/webtorrent-desktop.git","svn_url":"https://github.com/feross/webtorrent-desktop","homepage":"https://webtorrent.io/desktop","size":7783,"stargazers_count":260,"watchers_count":260,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":29,"forks":19,"open_issues":29,"watchers":260,"default_branch":"master"}},"base":{"label":"feross:master","ref":"master","sha":"15bd6dc3ef9283c0f1fe0d30fcb4c6d0faf3530c","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"repo":{"id":35015575,"name":"webtorrent-desktop","full_name":"feross/webtorrent-desktop","owner":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/feross/webtorrent-desktop","description":":rocket: WebTorrent, the streaming torrent client. For OS X, Windows, and Linux.","fork":false,"url":"https://api.github.com/repos/feross/webtorrent-desktop","forks_url":"https://api.github.com/repos/feross/webtorrent-desktop/forks","keys_url":"https://api.github.com/repos/feross/webtorrent-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feross/webtorrent-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feross/webtorrent-desktop/teams","hooks_url":"https://api.github.com/repos/feross/webtorrent-desktop/hooks","issue_events_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/feross/webtorrent-desktop/events","assignees_url":"https://api.github.com/repos/feross/webtorrent-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/feross/webtorrent-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/feross/webtorrent-desktop/tags","blobs_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feross/webtorrent-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/feross/webtorrent-desktop/languages","stargazers_url":"https://api.github.com/repos/feross/webtorrent-desktop/stargazers","contributors_url":"https://api.github.com/repos/feross/webtorrent-desktop/contributors","subscribers_url":"https://api.github.com/repos/feross/webtorrent-desktop/subscribers","subscription_url":"https://api.github.com/repos/feross/webtorrent-desktop/subscription","commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/feross/webtorrent-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/feross/webtorrent-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/feross/webtorrent-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feross/webtorrent-desktop/merges","archive_url":"https://api.github.com/repos/feross/webtorrent-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feross/webtorrent-desktop/downloads","issues_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/feross/webtorrent-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/feross/webtorrent-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feross/webtorrent-desktop/labels{/name}","releases_url":"https://api.github.com/repos/feross/webtorrent-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/feross/webtorrent-desktop/deployments","created_at":"2015-05-04T05:21:35Z","updated_at":"2016-04-05T12:50:45Z","pushed_at":"2016-04-05T22:19:24Z","git_url":"git://github.com/feross/webtorrent-desktop.git","ssh_url":"git@github.com:feross/webtorrent-desktop.git","clone_url":"https://github.com/feross/webtorrent-desktop.git","svn_url":"https://github.com/feross/webtorrent-desktop","homepage":"https://webtorrent.io/desktop","size":7783,"stargazers_count":260,"watchers_count":260,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":29,"forks":19,"open_issues":29,"watchers":260,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/299"},"html":{"href":"https://github.com/feross/webtorrent-desktop/pull/299"},"issue":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/issues/299"},"comments":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/issues/299/comments"},"review_comments":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/299/comments"},"review_comment":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/299/commits"},"statuses":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/statuses/e90d2591a656a5153dbf91092361a2435658f02a"}}}}