{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/176912846","pull_request_review_id":106702823,"id":176912846,"diff_hunk":"@@ -104,6 +112,9 @@ fn run_package_data_algorithm<T: BodyOperations + DomObject>(object: &T,\n         BodyType::Json => run_json_data_algorithm(cx, bytes),\n         BodyType::Blob => run_blob_data_algorithm(&global, bytes, mime),\n         BodyType::FormData => run_form_data_algorithm(&global, bytes, mime),\n+        BodyType::ArrayBuffer => unsafe {\n+            run_array_buffer_data_algorithm(cx, bytes)","path":"components/script/body.rs","position":55,"original_position":55,"commit_id":"80304a133f66ba4bda0070d29a36043d8f4b4334","original_commit_id":"80304a133f66ba4bda0070d29a36043d8f4b4334","user":{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars2.githubusercontent.com/u/1210596?v=4","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false},"body":"now `run_array_buffer_data_algorithm` is declared as unsafe fn, and this match arm uses unsafe scope.","created_at":"2018-03-24T16:00:18Z","updated_at":"2018-03-24T16:01:25Z","html_url":"https://github.com/servo/servo/pull/20406#discussion_r176912846","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/20406","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/176912846"},"html":{"href":"https://github.com/servo/servo/pull/20406#discussion_r176912846"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/20406"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/20406","id":177199350,"html_url":"https://github.com/servo/servo/pull/20406","diff_url":"https://github.com/servo/servo/pull/20406.diff","patch_url":"https://github.com/servo/servo/pull/20406.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/20406","number":20406,"state":"open","locked":false,"title":"feat(fetch): accept arraybuffer in consume_body ","user":{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars2.githubusercontent.com/u/1210596?v=4","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false},"body":"<!-- Please describe your changes on the following line: -->\r\nRelated to https://github.com/servo/servo/issues/20346.\r\n\r\nI realized I am not sufficiently knowledgeable about codebases and have high confidence this PR is not ready to be accepted. Raising it as PR early to possibly ask some suggestions around codebases.\r\n\r\nIf this PR seems unrecoverable by code review, please feel freely close and unassign me from issue 🙏 \r\n\r\nThis PR tries to implement #20346, updating `Body` idl and implements corresponding implementation in `body.rs` for `fetch`. Criteria for changes may includes\r\n\r\n- does `run_array_buffer_data_algorithm` implementation is legit for allocating arraybuffer? (probably not)\r\n- does `run_array_buffer_data_algorithm` implementation is acceptable for handling error, by naively returning `Error::JSFailed`?\r\n- there are some number of wpt test started to PASS with this PR. Is this legit side effect, or something incorrect by current implementation?\r\n- etcs, vice versa\r\n\r\n---\r\n<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->\r\n- [x] `./mach build -d` does not report any errors\r\n- [x] `./mach test-tidy` does not report any errors\r\n- [x] These changes fix #20346 (github issue number if applicable).\r\n\r\n<!-- Either: -->\r\n- [ ] There are tests for these changes OR\r\n- [ ] These changes do not require tests because _____\r\n- wpt test has changed in PR, need to be reviewed.\r\n\r\n<!-- Also, please make sure that \"Allow edits from maintainers\" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->\r\n\r\n<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/20406)\n<!-- Reviewable:end -->\n","created_at":"2018-03-23T22:40:27Z","updated_at":"2018-03-24T16:01:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"693420e88930945649200a9f55203dcfbfb60f30","assignee":{"login":"jdm","id":27658,"avatar_url":"https://avatars1.githubusercontent.com/u/27658?v=4","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false},"assignees":[{"login":"jdm","id":27658,"avatar_url":"https://avatars1.githubusercontent.com/u/27658?v=4","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":152310043,"url":"https://api.github.com/repos/servo/servo/labels/S-awaiting-review","name":"S-awaiting-review","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/20406/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/20406/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/20406/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/80304a133f66ba4bda0070d29a36043d8f4b4334","head":{"label":"kwonoj:feat-fetch-body-arraybuffer","ref":"feat-fetch-body-arraybuffer","sha":"80304a133f66ba4bda0070d29a36043d8f4b4334","user":{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars2.githubusercontent.com/u/1210596?v=4","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false},"repo":{"id":123978096,"name":"servo","full_name":"kwonoj/servo","owner":{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars2.githubusercontent.com/u/1210596?v=4","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kwonoj/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/kwonoj/servo","forks_url":"https://api.github.com/repos/kwonoj/servo/forks","keys_url":"https://api.github.com/repos/kwonoj/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kwonoj/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kwonoj/servo/teams","hooks_url":"https://api.github.com/repos/kwonoj/servo/hooks","issue_events_url":"https://api.github.com/repos/kwonoj/servo/issues/events{/number}","events_url":"https://api.github.com/repos/kwonoj/servo/events","assignees_url":"https://api.github.com/repos/kwonoj/servo/assignees{/user}","branches_url":"https://api.github.com/repos/kwonoj/servo/branches{/branch}","tags_url":"https://api.github.com/repos/kwonoj/servo/tags","blobs_url":"https://api.github.com/repos/kwonoj/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kwonoj/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kwonoj/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/kwonoj/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kwonoj/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/kwonoj/servo/languages","stargazers_url":"https://api.github.com/repos/kwonoj/servo/stargazers","contributors_url":"https://api.github.com/repos/kwonoj/servo/contributors","subscribers_url":"https://api.github.com/repos/kwonoj/servo/subscribers","subscription_url":"https://api.github.com/repos/kwonoj/servo/subscription","commits_url":"https://api.github.com/repos/kwonoj/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/kwonoj/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/kwonoj/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/kwonoj/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/kwonoj/servo/contents/{+path}","compare_url":"https://api.github.com/repos/kwonoj/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kwonoj/servo/merges","archive_url":"https://api.github.com/repos/kwonoj/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kwonoj/servo/downloads","issues_url":"https://api.github.com/repos/kwonoj/servo/issues{/number}","pulls_url":"https://api.github.com/repos/kwonoj/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/kwonoj/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/kwonoj/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kwonoj/servo/labels{/name}","releases_url":"https://api.github.com/repos/kwonoj/servo/releases{/id}","deployments_url":"https://api.github.com/repos/kwonoj/servo/deployments","created_at":"2018-03-05T20:59:08Z","updated_at":"2018-03-24T05:22:22Z","pushed_at":"2018-03-24T15:57:43Z","git_url":"git://github.com/kwonoj/servo.git","ssh_url":"git@github.com:kwonoj/servo.git","clone_url":"https://github.com/kwonoj/servo.git","svn_url":"https://github.com/kwonoj/servo","homepage":"https://servo.org/","size":363970,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"servo:master","ref":"master","sha":"2ab34d59691f969f945f6d313d1a68a2fbc11872","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":3390243,"name":"servo","full_name":"servo/servo","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/servo","description":"The Servo Browser Engine","fork":false,"url":"https://api.github.com/repos/servo/servo","forks_url":"https://api.github.com/repos/servo/servo/forks","keys_url":"https://api.github.com/repos/servo/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/servo/teams","hooks_url":"https://api.github.com/repos/servo/servo/hooks","issue_events_url":"https://api.github.com/repos/servo/servo/issues/events{/number}","events_url":"https://api.github.com/repos/servo/servo/events","assignees_url":"https://api.github.com/repos/servo/servo/assignees{/user}","branches_url":"https://api.github.com/repos/servo/servo/branches{/branch}","tags_url":"https://api.github.com/repos/servo/servo/tags","blobs_url":"https://api.github.com/repos/servo/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/servo/languages","stargazers_url":"https://api.github.com/repos/servo/servo/stargazers","contributors_url":"https://api.github.com/repos/servo/servo/contributors","subscribers_url":"https://api.github.com/repos/servo/servo/subscribers","subscription_url":"https://api.github.com/repos/servo/servo/subscription","commits_url":"https://api.github.com/repos/servo/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/servo/contents/{+path}","compare_url":"https://api.github.com/repos/servo/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/servo/merges","archive_url":"https://api.github.com/repos/servo/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/servo/downloads","issues_url":"https://api.github.com/repos/servo/servo/issues{/number}","pulls_url":"https://api.github.com/repos/servo/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/servo/labels{/name}","releases_url":"https://api.github.com/repos/servo/servo/releases{/id}","deployments_url":"https://api.github.com/repos/servo/servo/deployments","created_at":"2012-02-08T19:07:25Z","updated_at":"2018-03-24T15:29:03Z","pushed_at":"2018-03-24T16:00:34Z","git_url":"git://github.com/servo/servo.git","ssh_url":"git@github.com:servo/servo.git","clone_url":"https://github.com/servo/servo.git","svn_url":"https://github.com/servo/servo","homepage":"https://servo.org/","size":453769,"stargazers_count":11399,"watchers_count":11399,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1885,"mirror_url":null,"archived":false,"open_issues_count":2031,"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"},"forks":1885,"open_issues":2031,"watchers":11399,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/20406"},"html":{"href":"https://github.com/servo/servo/pull/20406"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/20406"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/20406/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/20406/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/20406/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/80304a133f66ba4bda0070d29a36043d8f4b4334"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kwonoj"}}