GitHub PullRequestReviewCommentEvent at 2014-09-03 16:50:35
Repository: libadblockplus
Actor: hexene
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/comments/17062592","id":17062592,"diff_hunk":"@@ -242,13 +282,16 @@ AdblockPlus::FilterPtr FilterEngine::Matches(const std::string& url,\n }\n \n AdblockPlus::FilterPtr FilterEngine::CheckFilterMatch(const std::string& url,\n-    const std::string& contentType,\n+    ContentType contentType,\n     const std::string& documentUrl) const\n {\n   JsValuePtr func = jsEngine->Evaluate(\"API.checkFilterMatch\");\n   JsValueList params;\n   params.push_back(jsEngine->NewValue(url));\n-  params.push_back(jsEngine->NewValue(contentType));\n+  std::string contentTypeStr = GetContentTypeString(contentType);\n+  if (!contentTypeStr.size())\n+    contentTypeStr = GetContentTypeString(ContentType::OTHER);","path":"src/FilterEngine.cpp","position":88,"original_position":88,"commit_id":"a0453ff262dbab4bdcf919a4a8a64ce5e3da8d24","original_commit_id":"a0453ff262dbab4bdcf919a4a8a64ce5e3da8d24","user":{"login":"hexene","id":849492,"avatar_url":"https://avatars.githubusercontent.com/u/849492?v=2","gravatar_id":"a46f4ab6fc94af9a9e228425dba1c4b7","url":"https://api.github.com/users/hexene","html_url":"https://github.com/hexene","followers_url":"https://api.github.com/users/hexene/followers","following_url":"https://api.github.com/users/hexene/following{/other_user}","gists_url":"https://api.github.com/users/hexene/gists{/gist_id}","starred_url":"https://api.github.com/users/hexene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hexene/subscriptions","organizations_url":"https://api.github.com/users/hexene/orgs","repos_url":"https://api.github.com/users/hexene/repos","events_url":"https://api.github.com/users/hexene/events{/privacy}","received_events_url":"https://api.github.com/users/hexene/received_events","type":"User","site_admin":false},"body":"Since an empty string will be returned if an invalid enum value is supplied, should I throw here? Or is it ok to pass on the empty string to js?","created_at":"2014-09-03T16:50:35Z","updated_at":"2014-09-03T16:50:35Z","html_url":"https://github.com/adblockplus/libadblockplus/pull/1#discussion_r17062592","pull_request_url":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/comments/17062592"},"html":{"href":"https://github.com/adblockplus/libadblockplus/pull/1#discussion_r17062592"},"pull_request":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/1","id":20631345,"html_url":"https://github.com/adblockplus/libadblockplus/pull/1","diff_url":"https://github.com/adblockplus/libadblockplus/pull/1.diff","patch_url":"https://github.com/adblockplus/libadblockplus/pull/1.patch","issue_url":"https://api.github.com/repos/adblockplus/libadblockplus/issues/1","number":1,"state":"open","locked":false,"title":"Issue 1286 - Add a content type enum for use with FilterEngine","user":{"login":"hexene","id":849492,"avatar_url":"https://avatars.githubusercontent.com/u/849492?v=2","gravatar_id":"a46f4ab6fc94af9a9e228425dba1c4b7","url":"https://api.github.com/users/hexene","html_url":"https://github.com/hexene","followers_url":"https://api.github.com/users/hexene/followers","following_url":"https://api.github.com/users/hexene/following{/other_user}","gists_url":"https://api.github.com/users/hexene/gists{/gist_id}","starred_url":"https://api.github.com/users/hexene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hexene/subscriptions","organizations_url":"https://api.github.com/users/hexene/orgs","repos_url":"https://api.github.com/users/hexene/repos","events_url":"https://api.github.com/users/hexene/events{/privacy}","received_events_url":"https://api.github.com/users/hexene/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-02T18:34:42Z","updated_at":"2014-09-03T16:50:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a81c467530b3dbd4153bb7b0d0293b303ca726c8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/1/commits","review_comments_url":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/1/comments","review_comment_url":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/comments/{number}","comments_url":"https://api.github.com/repos/adblockplus/libadblockplus/issues/1/comments","statuses_url":"https://api.github.com/repos/adblockplus/libadblockplus/statuses/a0453ff262dbab4bdcf919a4a8a64ce5e3da8d24","head":{"label":"hexene:master","ref":"master","sha":"a0453ff262dbab4bdcf919a4a8a64ce5e3da8d24","user":{"login":"hexene","id":849492,"avatar_url":"https://avatars.githubusercontent.com/u/849492?v=2","gravatar_id":"a46f4ab6fc94af9a9e228425dba1c4b7","url":"https://api.github.com/users/hexene","html_url":"https://github.com/hexene","followers_url":"https://api.github.com/users/hexene/followers","following_url":"https://api.github.com/users/hexene/following{/other_user}","gists_url":"https://api.github.com/users/hexene/gists{/gist_id}","starred_url":"https://api.github.com/users/hexene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hexene/subscriptions","organizations_url":"https://api.github.com/users/hexene/orgs","repos_url":"https://api.github.com/users/hexene/repos","events_url":"https://api.github.com/users/hexene/events{/privacy}","received_events_url":"https://api.github.com/users/hexene/received_events","type":"User","site_admin":false},"repo":{"id":23589764,"name":"libadblockplus","full_name":"hexene/libadblockplus","owner":{"login":"hexene","id":849492,"avatar_url":"https://avatars.githubusercontent.com/u/849492?v=2","gravatar_id":"a46f4ab6fc94af9a9e228425dba1c4b7","url":"https://api.github.com/users/hexene","html_url":"https://github.com/hexene","followers_url":"https://api.github.com/users/hexene/followers","following_url":"https://api.github.com/users/hexene/following{/other_user}","gists_url":"https://api.github.com/users/hexene/gists{/gist_id}","starred_url":"https://api.github.com/users/hexene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hexene/subscriptions","organizations_url":"https://api.github.com/users/hexene/orgs","repos_url":"https://api.github.com/users/hexene/repos","events_url":"https://api.github.com/users/hexene/events{/privacy}","received_events_url":"https://api.github.com/users/hexene/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hexene/libadblockplus","description":"A C++ wrapper library around the core functionality of Adblock Plus","fork":true,"url":"https://api.github.com/repos/hexene/libadblockplus","forks_url":"https://api.github.com/repos/hexene/libadblockplus/forks","keys_url":"https://api.github.com/repos/hexene/libadblockplus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hexene/libadblockplus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hexene/libadblockplus/teams","hooks_url":"https://api.github.com/repos/hexene/libadblockplus/hooks","issue_events_url":"https://api.github.com/repos/hexene/libadblockplus/issues/events{/number}","events_url":"https://api.github.com/repos/hexene/libadblockplus/events","assignees_url":"https://api.github.com/repos/hexene/libadblockplus/assignees{/user}","branches_url":"https://api.github.com/repos/hexene/libadblockplus/branches{/branch}","tags_url":"https://api.github.com/repos/hexene/libadblockplus/tags","blobs_url":"https://api.github.com/repos/hexene/libadblockplus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hexene/libadblockplus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hexene/libadblockplus/git/refs{/sha}","trees_url":"https://api.github.com/repos/hexene/libadblockplus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hexene/libadblockplus/statuses/{sha}","languages_url":"https://api.github.com/repos/hexene/libadblockplus/languages","stargazers_url":"https://api.github.com/repos/hexene/libadblockplus/stargazers","contributors_url":"https://api.github.com/repos/hexene/libadblockplus/contributors","subscribers_url":"https://api.github.com/repos/hexene/libadblockplus/subscribers","subscription_url":"https://api.github.com/repos/hexene/libadblockplus/subscription","commits_url":"https://api.github.com/repos/hexene/libadblockplus/commits{/sha}","git_commits_url":"https://api.github.com/repos/hexene/libadblockplus/git/commits{/sha}","comments_url":"https://api.github.com/repos/hexene/libadblockplus/comments{/number}","issue_comment_url":"https://api.github.com/repos/hexene/libadblockplus/issues/comments/{number}","contents_url":"https://api.github.com/repos/hexene/libadblockplus/contents/{+path}","compare_url":"https://api.github.com/repos/hexene/libadblockplus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hexene/libadblockplus/merges","archive_url":"https://api.github.com/repos/hexene/libadblockplus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hexene/libadblockplus/downloads","issues_url":"https://api.github.com/repos/hexene/libadblockplus/issues{/number}","pulls_url":"https://api.github.com/repos/hexene/libadblockplus/pulls{/number}","milestones_url":"https://api.github.com/repos/hexene/libadblockplus/milestones{/number}","notifications_url":"https://api.github.com/repos/hexene/libadblockplus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hexene/libadblockplus/labels{/name}","releases_url":"https://api.github.com/repos/hexene/libadblockplus/releases{/id}","created_at":"2014-09-02T18:08:01Z","updated_at":"2014-09-02T18:28:56Z","pushed_at":"2014-09-02T18:28:56Z","git_url":"git://github.com/hexene/libadblockplus.git","ssh_url":"git@github.com:hexene/libadblockplus.git","clone_url":"https://github.com/hexene/libadblockplus.git","svn_url":"https://github.com/hexene/libadblockplus","homepage":null,"size":954,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"adblockplus:master","ref":"master","sha":"a3d5287af2a47843af8f73506af8398f1eaa7574","user":{"login":"adblockplus","id":610601,"avatar_url":"https://avatars.githubusercontent.com/u/610601?v=2","gravatar_id":"bd909e2ee0bd08446f7470a24266ea61","url":"https://api.github.com/users/adblockplus","html_url":"https://github.com/adblockplus","followers_url":"https://api.github.com/users/adblockplus/followers","following_url":"https://api.github.com/users/adblockplus/following{/other_user}","gists_url":"https://api.github.com/users/adblockplus/gists{/gist_id}","starred_url":"https://api.github.com/users/adblockplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adblockplus/subscriptions","organizations_url":"https://api.github.com/users/adblockplus/orgs","repos_url":"https://api.github.com/users/adblockplus/repos","events_url":"https://api.github.com/users/adblockplus/events{/privacy}","received_events_url":"https://api.github.com/users/adblockplus/received_events","type":"Organization","site_admin":false},"repo":{"id":9766323,"name":"libadblockplus","full_name":"adblockplus/libadblockplus","owner":{"login":"adblockplus","id":610601,"avatar_url":"https://avatars.githubusercontent.com/u/610601?v=2","gravatar_id":"bd909e2ee0bd08446f7470a24266ea61","url":"https://api.github.com/users/adblockplus","html_url":"https://github.com/adblockplus","followers_url":"https://api.github.com/users/adblockplus/followers","following_url":"https://api.github.com/users/adblockplus/following{/other_user}","gists_url":"https://api.github.com/users/adblockplus/gists{/gist_id}","starred_url":"https://api.github.com/users/adblockplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adblockplus/subscriptions","organizations_url":"https://api.github.com/users/adblockplus/orgs","repos_url":"https://api.github.com/users/adblockplus/repos","events_url":"https://api.github.com/users/adblockplus/events{/privacy}","received_events_url":"https://api.github.com/users/adblockplus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adblockplus/libadblockplus","description":"A C++ wrapper library around the core functionality of Adblock Plus","fork":false,"url":"https://api.github.com/repos/adblockplus/libadblockplus","forks_url":"https://api.github.com/repos/adblockplus/libadblockplus/forks","keys_url":"https://api.github.com/repos/adblockplus/libadblockplus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adblockplus/libadblockplus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adblockplus/libadblockplus/teams","hooks_url":"https://api.github.com/repos/adblockplus/libadblockplus/hooks","issue_events_url":"https://api.github.com/repos/adblockplus/libadblockplus/issues/events{/number}","events_url":"https://api.github.com/repos/adblockplus/libadblockplus/events","assignees_url":"https://api.github.com/repos/adblockplus/libadblockplus/assignees{/user}","branches_url":"https://api.github.com/repos/adblockplus/libadblockplus/branches{/branch}","tags_url":"https://api.github.com/repos/adblockplus/libadblockplus/tags","blobs_url":"https://api.github.com/repos/adblockplus/libadblockplus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adblockplus/libadblockplus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adblockplus/libadblockplus/git/refs{/sha}","trees_url":"https://api.github.com/repos/adblockplus/libadblockplus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adblockplus/libadblockplus/statuses/{sha}","languages_url":"https://api.github.com/repos/adblockplus/libadblockplus/languages","stargazers_url":"https://api.github.com/repos/adblockplus/libadblockplus/stargazers","contributors_url":"https://api.github.com/repos/adblockplus/libadblockplus/contributors","subscribers_url":"https://api.github.com/repos/adblockplus/libadblockplus/subscribers","subscription_url":"https://api.github.com/repos/adblockplus/libadblockplus/subscription","commits_url":"https://api.github.com/repos/adblockplus/libadblockplus/commits{/sha}","git_commits_url":"https://api.github.com/repos/adblockplus/libadblockplus/git/commits{/sha}","comments_url":"https://api.github.com/repos/adblockplus/libadblockplus/comments{/number}","issue_comment_url":"https://api.github.com/repos/adblockplus/libadblockplus/issues/comments/{number}","contents_url":"https://api.github.com/repos/adblockplus/libadblockplus/contents/{+path}","compare_url":"https://api.github.com/repos/adblockplus/libadblockplus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adblockplus/libadblockplus/merges","archive_url":"https://api.github.com/repos/adblockplus/libadblockplus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adblockplus/libadblockplus/downloads","issues_url":"https://api.github.com/repos/adblockplus/libadblockplus/issues{/number}","pulls_url":"https://api.github.com/repos/adblockplus/libadblockplus/pulls{/number}","milestones_url":"https://api.github.com/repos/adblockplus/libadblockplus/milestones{/number}","notifications_url":"https://api.github.com/repos/adblockplus/libadblockplus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adblockplus/libadblockplus/labels{/name}","releases_url":"https://api.github.com/repos/adblockplus/libadblockplus/releases{/id}","created_at":"2013-04-30T07:42:51Z","updated_at":"2014-09-02T15:10:50Z","pushed_at":"2014-09-02T16:11:27Z","git_url":"git://github.com/adblockplus/libadblockplus.git","ssh_url":"git@github.com:adblockplus/libadblockplus.git","clone_url":"https://github.com/adblockplus/libadblockplus.git","svn_url":"https://github.com/adblockplus/libadblockplus","homepage":null,"size":1290,"stargazers_count":6,"watchers_count":6,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/1"},"html":{"href":"https://github.com/adblockplus/libadblockplus/pull/1"},"issue":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/issues/1"},"comments":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/adblockplus/libadblockplus/statuses/a0453ff262dbab4bdcf919a4a8a64ce5e3da8d24"}}}}