{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/43354607","id":43354607,"diff_hunk":"@@ -201,10 +202,17 @@\n     this._visible = false;\n   };\n \n+  PinPageSystemDialog.prototype._start = function() {\n+    window.addEventListener('pin-page-dialog-requestopen', this);\n+  };\n+\n+  PinPageSystemDialog.prototype._stop = function() {\n+    window.removeEventListener('pin-page-dialog-requestopen', this);\n+  };\n+\n   PinPageSystemDialog.prototype.destroy = function() {\n-    this.containerElement.removeChild(this.element);\n-    pinDialogInstance = null;\n-    this.publish('destroyed');\n+    this.stop();\n+    SystemDialog.prototype.destroy.apply(this);","path":"apps/system/js/pin_page_system_dialog.js","position":59,"original_position":59,"commit_id":"cd45859c4d3e44f53ccd461df17e01b757a57dca","original_commit_id":"cd45859c4d3e44f53ccd461df17e01b757a57dca","user":{"login":"mikehenrty","id":635365,"avatar_url":"https://avatars.githubusercontent.com/u/635365?v=3","gravatar_id":"","url":"https://api.github.com/users/mikehenrty","html_url":"https://github.com/mikehenrty","followers_url":"https://api.github.com/users/mikehenrty/followers","following_url":"https://api.github.com/users/mikehenrty/following{/other_user}","gists_url":"https://api.github.com/users/mikehenrty/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehenrty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehenrty/subscriptions","organizations_url":"https://api.github.com/users/mikehenrty/orgs","repos_url":"https://api.github.com/users/mikehenrty/repos","events_url":"https://api.github.com/users/mikehenrty/events{/privacy}","received_events_url":"https://api.github.com/users/mikehenrty/received_events","type":"User","site_admin":false},"body":"Why can't we just call `this.destroy()`?","created_at":"2015-10-29T07:12:04Z","updated_at":"2015-10-29T07:12:04Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/32751#discussion_r43354607","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32751","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/43354607"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/32751#discussion_r43354607"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32751"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32751","id":48768181,"html_url":"https://github.com/mozilla-b2g/gaia/pull/32751","diff_url":"https://github.com/mozilla-b2g/gaia/pull/32751.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/32751.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32751","number":32751,"state":"open","locked":false,"title":"Bug 1217289 - Leak browser iframe through BrowserContextMenu and PinPageSystemDialog r=mhenretty","user":{"login":"albertopq","id":368225,"avatar_url":"https://avatars.githubusercontent.com/u/368225?v=3","gravatar_id":"","url":"https://api.github.com/users/albertopq","html_url":"https://github.com/albertopq","followers_url":"https://api.github.com/users/albertopq/followers","following_url":"https://api.github.com/users/albertopq/following{/other_user}","gists_url":"https://api.github.com/users/albertopq/gists{/gist_id}","starred_url":"https://api.github.com/users/albertopq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertopq/subscriptions","organizations_url":"https://api.github.com/users/albertopq/orgs","repos_url":"https://api.github.com/users/albertopq/repos","events_url":"https://api.github.com/users/albertopq/events{/privacy}","received_events_url":"https://api.github.com/users/albertopq/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-10-26T17:09:08Z","updated_at":"2015-10-29T07:12:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e258a047dc52ef9c0a48ddf32d26b849abba7c8f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32751/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32751/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32751/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/cd45859c4d3e44f53ccd461df17e01b757a57dca","head":{"label":"albertopq:1217289-leak-pin-dialog","ref":"1217289-leak-pin-dialog","sha":"cd45859c4d3e44f53ccd461df17e01b757a57dca","user":{"login":"albertopq","id":368225,"avatar_url":"https://avatars.githubusercontent.com/u/368225?v=3","gravatar_id":"","url":"https://api.github.com/users/albertopq","html_url":"https://github.com/albertopq","followers_url":"https://api.github.com/users/albertopq/followers","following_url":"https://api.github.com/users/albertopq/following{/other_user}","gists_url":"https://api.github.com/users/albertopq/gists{/gist_id}","starred_url":"https://api.github.com/users/albertopq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertopq/subscriptions","organizations_url":"https://api.github.com/users/albertopq/orgs","repos_url":"https://api.github.com/users/albertopq/repos","events_url":"https://api.github.com/users/albertopq/events{/privacy}","received_events_url":"https://api.github.com/users/albertopq/received_events","type":"User","site_admin":false},"repo":{"id":23386404,"name":"gaia","full_name":"albertopq/gaia","owner":{"login":"albertopq","id":368225,"avatar_url":"https://avatars.githubusercontent.com/u/368225?v=3","gravatar_id":"","url":"https://api.github.com/users/albertopq","html_url":"https://github.com/albertopq","followers_url":"https://api.github.com/users/albertopq/followers","following_url":"https://api.github.com/users/albertopq/following{/other_user}","gists_url":"https://api.github.com/users/albertopq/gists{/gist_id}","starred_url":"https://api.github.com/users/albertopq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertopq/subscriptions","organizations_url":"https://api.github.com/users/albertopq/orgs","repos_url":"https://api.github.com/users/albertopq/repos","events_url":"https://api.github.com/users/albertopq/events{/privacy}","received_events_url":"https://api.github.com/users/albertopq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/albertopq/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/albertopq/gaia","forks_url":"https://api.github.com/repos/albertopq/gaia/forks","keys_url":"https://api.github.com/repos/albertopq/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/albertopq/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/albertopq/gaia/teams","hooks_url":"https://api.github.com/repos/albertopq/gaia/hooks","issue_events_url":"https://api.github.com/repos/albertopq/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/albertopq/gaia/events","assignees_url":"https://api.github.com/repos/albertopq/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/albertopq/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/albertopq/gaia/tags","blobs_url":"https://api.github.com/repos/albertopq/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/albertopq/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/albertopq/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/albertopq/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/albertopq/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/albertopq/gaia/languages","stargazers_url":"https://api.github.com/repos/albertopq/gaia/stargazers","contributors_url":"https://api.github.com/repos/albertopq/gaia/contributors","subscribers_url":"https://api.github.com/repos/albertopq/gaia/subscribers","subscription_url":"https://api.github.com/repos/albertopq/gaia/subscription","commits_url":"https://api.github.com/repos/albertopq/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/albertopq/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/albertopq/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/albertopq/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/albertopq/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/albertopq/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/albertopq/gaia/merges","archive_url":"https://api.github.com/repos/albertopq/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/albertopq/gaia/downloads","issues_url":"https://api.github.com/repos/albertopq/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/albertopq/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/albertopq/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/albertopq/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/albertopq/gaia/labels{/name}","releases_url":"https://api.github.com/repos/albertopq/gaia/releases{/id}","created_at":"2014-08-27T10:53:19Z","updated_at":"2014-08-27T12:10:35Z","pushed_at":"2015-10-28T20:09:52Z","git_url":"git://github.com/albertopq/gaia.git","ssh_url":"git@github.com:albertopq/gaia.git","clone_url":"https://github.com/albertopq/gaia.git","svn_url":"https://github.com/albertopq/gaia","homepage":"https://wiki.mozilla.org/B2G","size":975144,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"01b38b061958ab8593794f901a380b40de77cf70","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2015-10-26T01:49:34Z","pushed_at":"2015-10-29T06:26:55Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1678827,"stargazers_count":1992,"watchers_count":1992,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2498,"mirror_url":null,"open_issues_count":1256,"forks":2498,"open_issues":1256,"watchers":1992,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32751"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/32751"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32751"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32751/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32751/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32751/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/cd45859c4d3e44f53ccd461df17e01b757a57dca"}}}}