gecko-dev/servo/components
OJ Kwon 3b32f0e8be servo: Merge #20406 - feat(fetch): accept arraybuffer in consume_body (from kwonoj:feat-fetch-body-arraybuffer); r=jdm
feat(fetch): accept arraybuffer in consume_body

<!-- Please describe your changes on the following line: -->
Related to https://github.com/servo/servo/issues/20346.

I 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.

If this PR seems unrecoverable by code review, please feel freely close and unassign me from issue 🙏

This PR tries to implement #20346, updating `Body` idl and implements corresponding implementation in `body.rs` for `fetch`. Criteria for changes may includes

- does `run_array_buffer_data_algorithm` implementation is legit for allocating arraybuffer? (probably not)
- does `run_array_buffer_data_algorithm` implementation is acceptable for handling error, by naively returning `Error::JSFailed`?
- there are some number of wpt test started to PASS with this PR. Is this legit side effect, or something incorrect by current implementation?
- etcs, vice versa

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20346 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
- wpt test has changed in PR, need to be reviewed.

<!-- 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.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 23b2f42a368cdc68548310e79b31306f40f95553

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3cf96067aca4fa0a3f7d31256758f472b3d1c169
2018-03-24 13:46:20 -04:00
..
allocator servo: Merge #19061 - FreeType: don’t use usable_size() as deallocation size (from servo:ft-alloc); r=mbrubeck 2017-10-30 12:40:34 -05:00
atoms servo: Merge #20181 - Fire the pageshow event at the end of the page load (from fabricedesre:end-load-pageshow); r=jdm 2018-03-06 10:49:51 -05:00
bluetooth servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
bluetooth_traits servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
canvas servo: Merge #20395 - Update WR (accelerated webgl fix on mac, line decoration optimizations) (from glennw:update-wr-webgl); r=jdm 2018-03-22 19:11:10 -04:00
canvas_traits servo: Merge #20375 - Fall down the WebGL rabbit hole and fix some bugs there (from servo:webgl); r=emilio 2018-03-22 15:32:45 -04:00
compositing servo: Merge #20320 - feat(capture_webrender): write webrender revision into text (from kwonoj:feat-wr-revision); r=jdm 2018-03-23 02:30:49 -04:00
config servo: Merge #20395 - Update WR (accelerated webgl fix on mac, line decoration optimizations) (from glennw:update-wr-webgl); r=jdm 2018-03-22 19:11:10 -04:00
constellation servo: Merge #20228 - Ports refactoring (from paulrouget:ports_refactor); r=jdm 2018-03-22 08:10:45 -04:00
debugger servo: Merge #20328 - Re-expose webrender debugger feature in components/servo (from Moggers:enable-debugger); r=jdm 2018-03-19 17:46:42 -04:00
deny_public_fields servo: Merge #20022 - Update syn, quote and synstructure (from Eijebong:syn); r=nox 2018-02-13 11:15:54 -05:00
devtools servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
devtools_traits servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
dom_struct servo: Merge #19476 - Use workspace.default-members to specify default crates for cargo build (from servo:default-members); r=nox 2017-12-07 06:53:07 -06:00
domobject_derive servo: Merge #20022 - Update syn, quote and synstructure (from Eijebong:syn); r=nox 2018-02-13 11:15:54 -05:00
fallible servo: Merge #19494 - Update smallvec to 0.6 (from Eijebong:smallvec); r=emilio 2017-12-05 13:44:19 -06:00
geometry servo: Merge #20071 - Use typed coordinates more (from paulrouget:typedsize); r=glennw 2018-03-16 17:18:24 -04:00
gfx servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
gfx_traits servo: Merge #19933 - Update WebRender (from mrobinson:update-wr); r=emilio 2018-02-06 09:12:58 -05:00
hashglobe servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
jstraceable_derive servo: Merge #20022 - Update syn, quote and synstructure (from Eijebong:syn); r=nox 2018-02-13 11:15:54 -05:00
layout servo: Merge #20390 - Don't OOM when laying out basic web pages on Android (from jdm:android-layout-workaround); r=emilio 2018-03-22 18:20:38 -04:00
layout_thread servo: Merge #20378 - Bump parking_lot to 0.5 (from Eijebong:parking_lot); r=jdm 2018-03-21 14:16:57 -04:00
layout_traits servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
malloc_size_of servo: Merge #20399 - Sanitize Heap::handle(_mut) functions (from Xanewok:remove-heap-handle-mut); r=jdm 2018-03-23 13:06:01 -04:00
malloc_size_of_derive servo: Merge #20022 - Update syn, quote and synstructure (from Eijebong:syn); r=nox 2018-02-13 11:15:54 -05:00
metrics servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
msg servo: Merge #19975 - Kill browserhtml (from paulrouget:killbhtml); r=mbrubeck,emilio 2018-02-13 04:54:47 -05:00
net servo: Merge #20395 - Update WR (accelerated webgl fix on mac, line decoration optimizations) (from glennw:update-wr-webgl); r=jdm 2018-03-22 19:11:10 -04:00
net_traits servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
nonzero servo: Merge #18875 - Remove the need for rust-mozjs to use unstable Rust features (from servo:stable-js); r=nox,jdm 2017-10-16 17:07:50 -05:00
profile servo: Merge #20132 - Profiler for blocked IpcReceiver::recv() (from nakul02:issue_19223); r=jdm 2018-03-22 16:38:32 -04:00
profile_traits servo: Merge #20132 - Profiler for blocked IpcReceiver::recv() (from nakul02:issue_19223); r=jdm 2018-03-22 16:38:32 -04:00
rand servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
range servo: Merge #18938 - Replace all uses of the heapsize crate with malloc_size_of (from nnethercote:bug-1409255); r=SimonSapin 2017-10-18 13:56:05 -05:00
remutex servo: Merge #19819 - Merge some test crates in their corresponding components (from servo:rm-test-crates); r=<try> 2018-01-20 08:51:27 -06:00
script servo: Merge #20406 - feat(fetch): accept arraybuffer in consume_body (from kwonoj:feat-fetch-body-arraybuffer); r=jdm 2018-03-24 13:46:20 -04:00
script_layout_interface servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
script_plugins servo: Merge #19098 - Make the unrooted_must_root conditional on a default Cargo feature (from servo:minimal-plugin); r=jdm 2017-11-02 09:28:13 -05:00
script_traits servo: Merge #20228 - Ports refactoring (from paulrouget:ports_refactor); r=jdm 2018-03-22 08:10:45 -04:00
selectors servo: Merge #20243 - style: add infrastructure to match the :host selector (from emilio:host-selector-on-the-way); r=SimonSapin 2018-03-14 10:38:45 -04:00
servo servo: Merge #20395 - Update WR (accelerated webgl fix on mac, line decoration optimizations) (from glennw:update-wr-webgl); r=jdm 2018-03-22 19:11:10 -04:00
servo_arc servo: Merge #20088 - Fix license metadata for servo_arc crate (from mbrubeck:license); r=SimonSapin 2018-02-21 19:35:55 -05:00
size_of_test
style servo: Merge #20386 - style: Rename StyleContext to ComputedStyle (from emilio:computed-style-rename); r=jwatt 2018-03-22 13:48:24 -04:00
style_derive servo: Merge #20275 - Finish cleaning up trait bounds generation in style_derive (from servo:derive-all-the-things); r=emilio 2018-03-12 04:52:02 -04:00
style_traits servo: Merge #20236 - Introduce #[css(skip_if)] (from emilio:to-css-skip-if); r=nox 2018-03-08 09:16:55 -05:00
url servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
webdriver_server servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
webvr servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00
webvr_traits servo: Merge #20371 - Bump ipc-channel and bincode (from Eijebong:ipc-channel); r=nox 2018-03-21 09:00:16 -04:00