payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/comments/253116590","pull_request_review_id":199160727,"id":253116590,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1MzExNjU5MA==","diff_hunk":"@@ -0,0 +1,57 @@\n+let DataReceiver = {\n+  callbacks: new Map(),\n+  onDataReceived: (aSocketId, aData) => {\n+    if (!DataReceiver.callbacks.has(aSocketId)) {\n+      return;\n+    }\n+    DataReceiver.callbacks.get(aSocketId)._updateQueue(aData);\n+  },\n+};\n+\n+browser.sockets.onDataReceived.addListener(DataReceiver.onDataReceived);\n+\n+let ListeningSockets = new Map();\n+\n+export class ListeningSocket {\n+  constructor() {\n+    this.queue = []; // stores messages sent to socket\n+  }\n+\n+  async startListening() {\n+    this.port = await browser.sockets.createServerSocket();\n+    DataReceiver.callbacks.set(this.port, this);\n+    browser.sockets.startListening(this.port);\n+    console.log('Listening on port ' + this.port);\n+  }\n+\n+  _updateQueue(data) {\n+    console.log('_updateQueue data', data);\n+    this.queue.push(data);\n+  }\n+}\n+\n+export class SendingSocket {\n+  constructor() {\n+  }\n+\n+  async connect(host, port) {\n+    this.id = await browser.sockets.createSendingSocket();\n+    browser.sockets.connect(this.id, host, port);\n+    console.log(`Connected to ${host}:${port}`);\n+  }\n+\n+  send(aData, serializationSymbol) {","path":"src/socket.js","position":43,"original_position":43,"commit_id":"e9b15dc5d05f11a056b2ed65794348cc7afb2fd6","original_commit_id":"e9b15dc5d05f11a056b2ed65794348cc7afb2fd6","user":{"login":"nhnt11","id":485488,"node_id":"MDQ6VXNlcjQ4NTQ4OA==","avatar_url":"https://avatars2.githubusercontent.com/u/485488?v=4","gravatar_id":"","url":"https://api.github.com/users/nhnt11","html_url":"https://github.com/nhnt11","followers_url":"https://api.github.com/users/nhnt11/followers","following_url":"https://api.github.com/users/nhnt11/following{/other_user}","gists_url":"https://api.github.com/users/nhnt11/gists{/gist_id}","starred_url":"https://api.github.com/users/nhnt11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhnt11/subscriptions","organizations_url":"https://api.github.com/users/nhnt11/orgs","repos_url":"https://api.github.com/users/nhnt11/repos","events_url":"https://api.github.com/users/nhnt11/events{/privacy}","received_events_url":"https://api.github.com/users/nhnt11/received_events","type":"User","site_admin":false},"body":"This also reveals the problem with visit_id","created_at":"2019-02-01T16:38:41Z","updated_at":"2019-02-01T16:38:41Z","html_url":"https://github.com/mozilla/openwpm-firefox-webext/pull/9#discussion_r253116590","pull_request_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/9","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/comments/253116590"},"html":{"href":"https://github.com/mozilla/openwpm-firefox-webext/pull/9#discussion_r253116590"},"pull_request":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/9"}},"in_reply_to_id":252140811},"pull_request":{"url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/9","id":248421613,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQ4NDIxNjEz","html_url":"https://github.com/mozilla/openwpm-firefox-webext/pull/9","diff_url":"https://github.com/mozilla/openwpm-firefox-webext/pull/9.diff","patch_url":"https://github.com/mozilla/openwpm-firefox-webext/pull/9.patch","issue_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues/9","number":9,"state":"open","locked":false,"title":"Commit sockets and profile dir I/O APIs into the repo","user":{"login":"nhnt11","id":485488,"node_id":"MDQ6VXNlcjQ4NTQ4OA==","avatar_url":"https://avatars2.githubusercontent.com/u/485488?v=4","gravatar_id":"","url":"https://api.github.com/users/nhnt11","html_url":"https://github.com/nhnt11","followers_url":"https://api.github.com/users/nhnt11/followers","following_url":"https://api.github.com/users/nhnt11/following{/other_user}","gists_url":"https://api.github.com/users/nhnt11/gists{/gist_id}","starred_url":"https://api.github.com/users/nhnt11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhnt11/subscriptions","organizations_url":"https://api.github.com/users/nhnt11/orgs","repos_url":"https://api.github.com/users/nhnt11/repos","events_url":"https://api.github.com/users/nhnt11/events{/privacy}","received_events_url":"https://api.github.com/users/nhnt11/received_events","type":"User","site_admin":false},"body":"This PR was created by:\r\n - Running `npm install && npm build`\r\n - In `.gitignore`: removed `src/privileged` and made the ignored JS files explicit\r\n - Updated package.json ","created_at":"2019-01-29T08:58:07Z","updated_at":"2019-02-01T16:38:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0a8fcd3fe8d72ffbe59abccc5b7569b5543c471","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/9/commits","review_comments_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/9/comments","review_comment_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues/9/comments","statuses_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/statuses/e9b15dc5d05f11a056b2ed65794348cc7afb2fd6","head":{"label":"mozilla:wee-apis","ref":"wee-apis","sha":"e9b15dc5d05f11a056b2ed65794348cc7afb2fd6","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":164108291,"node_id":"MDEwOlJlcG9zaXRvcnkxNjQxMDgyOTE=","name":"openwpm-firefox-webext","full_name":"mozilla/openwpm-firefox-webext","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/openwpm-firefox-webext","description":null,"fork":false,"url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext","forks_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/forks","keys_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/teams","hooks_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/hooks","issue_events_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/events","assignees_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/tags","blobs_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/languages","stargazers_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/stargazers","contributors_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/contributors","subscribers_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/subscribers","subscription_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/subscription","commits_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/merges","archive_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/downloads","issues_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/deployments","created_at":"2019-01-04T13:03:05Z","updated_at":"2019-01-30T09:28:54Z","pushed_at":"2019-01-30T01:16:14Z","git_url":"git://github.com/mozilla/openwpm-firefox-webext.git","ssh_url":"git@github.com:mozilla/openwpm-firefox-webext.git","clone_url":"https://github.com/mozilla/openwpm-firefox-webext.git","svn_url":"https://github.com/mozilla/openwpm-firefox-webext","homepage":null,"size":452,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"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","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":6,"watchers":2,"default_branch":"master"}},"base":{"label":"mozilla:review-fixes","ref":"review-fixes","sha":"8b4bc1b3f07717b846949b888b51c2a827c60cd9","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":164108291,"node_id":"MDEwOlJlcG9zaXRvcnkxNjQxMDgyOTE=","name":"openwpm-firefox-webext","full_name":"mozilla/openwpm-firefox-webext","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/openwpm-firefox-webext","description":null,"fork":false,"url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext","forks_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/forks","keys_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/teams","hooks_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/hooks","issue_events_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/events","assignees_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/tags","blobs_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/languages","stargazers_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/stargazers","contributors_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/contributors","subscribers_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/subscribers","subscription_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/subscription","commits_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/merges","archive_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/downloads","issues_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/deployments","created_at":"2019-01-04T13:03:05Z","updated_at":"2019-01-30T09:28:54Z","pushed_at":"2019-01-30T01:16:14Z","git_url":"git://github.com/mozilla/openwpm-firefox-webext.git","ssh_url":"git@github.com:mozilla/openwpm-firefox-webext.git","clone_url":"https://github.com/mozilla/openwpm-firefox-webext.git","svn_url":"https://github.com/mozilla/openwpm-firefox-webext","homepage":null,"size":452,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"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","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/9"},"html":{"href":"https://github.com/mozilla/openwpm-firefox-webext/pull/9"},"issue":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues/9"},"comments":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/openwpm-firefox-webext/statuses/e9b15dc5d05f11a056b2ed65794348cc7afb2fd6"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"nhnt11"}}