gecko-dev/servo/components/script
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
..
docs servo: Merge #18635 - Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things (from servo:RENAME-ALL-THE-THINGS); r=emilio 2017-09-26 03:20:05 -05:00
dom 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
task_source servo: Merge #18670 - added time to interactive metrics (from avadacatavra:interactive-metrics); r=jdm 2017-10-25 15:53:57 -05:00
body.rs 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
build.rs servo: Merge #18971 - Use env::var_os to read paths from the environment (from mbrubeck:var); r=emilio 2017-10-21 08:09:22 -05:00
Cargo.toml servo: Merge #20399 - Sanitize Heap::handle(_mut) functions (from Xanewok:remove-heap-handle-mut); r=jdm 2018-03-23 13:06:01 -04:00
clipboard_provider.rs servo: Merge #17425 - cleanup embedder/compositor/constellation/script messages (from paulrouget:attach-pipeline-2); r=asajeffrey 2017-08-15 02:20:10 -05:00
CMakeLists.txt servo: Merge #20290 - build(cmake): detect python binary for specified version (from kwonoj:build-python-version); r=jdm 2018-03-13 16:29:19 -04:00
devtools.rs servo: Merge #19881 - Add layout RPC query for getting an element's style (from jonleighton:issue-19811); r=emilio 2018-01-28 05:52:56 -06:00
document_loader.rs servo: Merge #19569 - Add a topLevelDomComplete metric (from asajeffrey:script-perf-measure-topLevelDomComplete); r=jdm 2017-12-14 17:02:44 -06:00
fetch.rs servo: Merge #19329 - Add RAII guard for cancelling fetch when the consumer no longer cares about it (from Manishearth:fetchcanceller); r=jdm 2017-11-22 18:30:57 -06:00
layout_image.rs servo: Merge #18981 - Merge request type and destination (from KiChjang:fold-type-destination); r=avadacatavra 2017-10-24 17:02:18 -05:00
lib.rs servo: Merge #20216 - Switch from servo/angle to the mozangle crate (from servo:mozangle); r=emilio 2018-03-12 09:23:52 -04:00
mem.rs 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
microtask.rs 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
network_listener.rs servo: Merge #18573 - Introduce TaskOnce (from servo:TASKS); r=SimonSapin 2017-09-20 05:17:12 -05:00
script_runtime.rs servo: Merge #19722 - Remove js.mem.gc.refresh_frame_slices.enabled pref (from adrian17:master); r=emilio 2018-01-08 04:52:09 -06:00
script_thread.rs servo: Merge #20262 - constellation: Make setting up the WebGL state fallible (from emilio:webgl-fallible); r=jdm 2018-03-09 18:24:56 -05:00
serviceworker_manager.rs
serviceworkerjob.rs servo: Merge #18670 - added time to interactive metrics (from avadacatavra:interactive-metrics); r=jdm 2017-10-25 15:53:57 -05:00
stylesheet_loader.rs servo: Merge #20238 - Construct URLValue eagerly and share it between specified value and style structs (from upsuper:url-value); r=emilio 2018-03-08 08:06:35 -05:00
task.rs 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
test.rs servo: Merge #18716 - Parse srcset attribute values (from jdm:parseSrcset); r=jdm 2017-10-04 07:32:53 -05:00
textinput.rs servo: Merge #20089 - Revert previously merged code, better implementation for Default selectionStart and selectionEnd (from paavininanda:RevertChanges); r=jdm 2018-02-22 17:35:33 -05:00
timers.rs servo: Merge #20399 - Sanitize Heap::handle(_mut) functions (from Xanewok:remove-heap-handle-mut); r=jdm 2018-03-23 13:06:01 -04:00
unpremultiplytable.rs
webdriver_handlers.rs servo: Merge #18635 - Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things (from servo:RENAME-ALL-THE-THINGS); r=emilio 2017-09-26 03:20:05 -05:00