{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/valence/issues/191","labels_url":"https://api.github.com/repos/mozilla/valence/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/valence/issues/191/comments","events_url":"https://api.github.com/repos/mozilla/valence/issues/191/events","html_url":"https://github.com/mozilla/valence/pull/191","id":89435474,"number":191,"title":"Remove types by name, instead of tracking our own set. Fixes #7, #190.","user":{"login":"jryans","id":279572,"avatar_url":"https://avatars.githubusercontent.com/u/279572?v=3","gravatar_id":"","url":"https://api.github.com/users/jryans","html_url":"https://github.com/jryans","followers_url":"https://api.github.com/users/jryans/followers","following_url":"https://api.github.com/users/jryans/following{/other_user}","gists_url":"https://api.github.com/users/jryans/gists{/gist_id}","starred_url":"https://api.github.com/users/jryans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jryans/subscriptions","organizations_url":"https://api.github.com/users/jryans/orgs","repos_url":"https://api.github.com/users/jryans/repos","events_url":"https://api.github.com/users/jryans/events{/privacy}","received_events_url":"https://api.github.com/users/jryans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-19T00:51:33Z","updated_at":"2015-07-04T16:33:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/valence/pulls/191","html_url":"https://github.com/mozilla/valence/pull/191","diff_url":"https://github.com/mozilla/valence/pull/191.diff","patch_url":"https://github.com/mozilla/valence/pull/191.patch"},"body":"In #98, some work was done to try to remove types Valence registers when the add-on is unloaded.\r\n\r\nHowever, it never really caught all of them. The reason is that protocol.js registers some types lazily, so they did not pass through the Valence wrapper methods in `protocol-extra.js`, which means we didn't know we needed to remove them at unload time.\r\n\r\nRather than getting even fancier here, it's simpler for protocol.js to export the type set, and we can dig through it and find all the ones we know came from us.\r\n\r\nThis depends on [bug 1176137][1] for unload to actually work. For Firefox without that bug's patch, the add-on still works, but unloading continues to fail, as it did before, so no behavior change.\r\n\r\n[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1176137"},"comment":{"url":"https://api.github.com/repos/mozilla/valence/issues/comments/118529078","html_url":"https://github.com/mozilla/valence/pull/191#issuecomment-118529078","issue_url":"https://api.github.com/repos/mozilla/valence/issues/191","id":118529078,"user":{"login":"victorporof","id":248899,"avatar_url":"https://avatars.githubusercontent.com/u/248899?v=3","gravatar_id":"","url":"https://api.github.com/users/victorporof","html_url":"https://github.com/victorporof","followers_url":"https://api.github.com/users/victorporof/followers","following_url":"https://api.github.com/users/victorporof/following{/other_user}","gists_url":"https://api.github.com/users/victorporof/gists{/gist_id}","starred_url":"https://api.github.com/users/victorporof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorporof/subscriptions","organizations_url":"https://api.github.com/users/victorporof/orgs","repos_url":"https://api.github.com/users/victorporof/repos","events_url":"https://api.github.com/users/victorporof/events{/privacy}","received_events_url":"https://api.github.com/users/victorporof/received_events","type":"User","site_admin":false},"created_at":"2015-07-04T16:33:26Z","updated_at":"2015-07-04T16:33:26Z","body":"@jryans This works"}}