servo/components
bors-servo f7ee1befc5
Auto merge of #20267 - Xanewok:typed-arrays-stack-heap-variants, r=Xanewok
Support JS typed arrays as arguments and in WebIDL unions

<!-- Please describe your changes on the following line: -->
Supersedes #20205.
This brings support to receiving typed arrays as function arguments (those are stack-rooted with CustomAutoRooter) and also being a member of a union (which is basically heap-rooted? similarly to other webidl unions).

This is based on my other PR #20265 (which means it has to pull an external rust-mozjs branch and contains some also slightly unrelated changes here) since it shares `RootedTraceableBox::from_box` here and some other additional changes at rust-mozjs, but it can be easily separated if needed.

I tried adding support to nullable typed arrays but couldn't work around an issue of codegen always sticking a "OrNull" at the end of my type (presumably because of [this](https://github.com/servo/servo/blob/master/components/script/dom/bindings/codegen/parser/WebIDL.py#L2241)?). How would I go about avoiding the suffix with nullable arguments?

If we were to add also support for nullable typed arrays then I think we wouldn't be blocked anymore on this in WebGL 1.0.

r? @jdm

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20267)
<!-- Reviewable:end -->
2018-03-14 15:43:18 -04:00
..
allocator FreeType: don’t use usable_size() as deallocation size 2017-10-30 18:22:30 +01:00
atoms Fire the pageshow event at the end of the page load r=jdm 2018-03-06 07:24:24 -08:00
bluetooth update tinyfiledialogs 2018-03-03 08:35:44 +01:00
bluetooth_traits Update WR (details below): 2017-10-16 16:33:24 +10:00
canvas constellation: Make setting up the WebGL state fallible. 2018-03-09 23:27:29 +01:00
canvas_traits Add WebGL function glGetTexParameter 2018-03-06 15:28:10 +02:00
compositing Send window size even when there is not top level browsing context yet 2018-03-09 09:29:13 +08:00
config removed default_data_dir() and default_cache_dir() components/config/basedir.rs 2018-03-02 22:39:07 +02:00
constellation constellation: Make setting up the WebGL state fallible. 2018-03-09 23:27:29 +01:00
debugger
deny_public_fields Bump syn/quote in deny_public_fields 2018-02-12 15:05:18 +01:00
devtools Update cookie to 0.10 2017-11-24 10:49:14 +01:00
devtools_traits Update cookie to 0.10 2017-11-24 10:49:14 +01:00
dom_struct Upgrade to rustc 1.24.0-nightly (5a2465e2b 2017-12-06) 2017-12-07 13:50:09 +01:00
domobject_derive Bump syn/quote in domobject_derive 2018-02-12 17:07:40 +01:00
fallible Update smallvec to 0.6 2017-12-05 12:03:20 +01:00
geometry Bump euclid to 0.17 2018-02-28 09:46:59 +01:00
gfx Bump euclid to 0.17 2018-02-28 09:46:59 +01:00
gfx_traits Update WebRender 2018-02-06 15:10:35 +01:00
hashglobe style: Back out ordermap. 2018-02-12 12:20:46 +01:00
jstraceable_derive Bump syn/quote in jstraceable_derive 2018-02-12 17:07:58 +01:00
layout Stop using LocalClip::RoundedRect 2018-03-06 21:26:22 +01:00
layout_thread style: Add infrastructure to match :host. 2018-03-14 15:10:05 +01:00
layout_traits Update WR (details below): 2017-10-16 16:33:24 +10:00
malloc_size_of Use mozjs 2.0 2018-03-14 18:43:26 +01:00
malloc_size_of_derive Bump syn/quote in malloc_size_of_derive 2018-02-12 17:08:19 +01:00
metrics Decoupled gfx and metrics 2018-01-15 16:25:51 +01:00
msg remove mozbrowser code 2018-02-13 09:40:06 +01:00
net update tinyfiledialogs 2018-03-03 08:35:44 +01:00
net_traits Update image to 0.18 2018-02-28 16:25:35 +01:00
nonzero Replace NonZeroU32 and NonZeroUsize with a generic NonZero 2017-10-16 20:19:19 +02:00
profile Add tool to chart memory usage from reports. 2018-03-08 22:46:42 -05:00
profile_traits added time to interactive metrics, refactored metrics to use traits 2017-10-24 21:02:56 +01:00
rand Update lazy_static to 1.0 2017-12-04 22:51:13 +01:00
range Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
remutex Merge servo_remutex to servo_remutex_tests 2018-01-20 15:37:04 +01:00
script Use helper is_typed_array function 2018-03-14 18:43:27 +01:00
script_layout_interface Bump euclid to 0.17 2018-02-28 09:46:59 +01:00
script_plugins Make the unrooted_must_root conditional on a default Cargo feature. 2017-11-02 15:08:04 +01:00
script_traits constellation: Make setting up the WebGL state fallible. 2018-03-09 23:27:29 +01:00
selectors style: Add infrastructure to match :host. 2018-03-14 15:10:05 +01:00
servo constellation: Make setting up the WebGL state fallible. 2018-03-09 23:27:29 +01:00
servo_arc Fix license metadata for servo_arc crate 2018-02-21 16:35:18 -08:00
size_of_test
style Auto merge of #20224 - emilio:counter-serialization, r=nox 2018-03-14 13:26:00 -04:00
style_derive Share a single #[animation(no_bound(…))] for the animation traits 2018-03-12 09:48:25 +01:00
style_traits style: Document #[css(skip_if)] 2018-03-08 10:28:10 +01:00
url Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
webdriver_server Update image to 0.18 2018-02-28 16:25:35 +01:00
webvr Bump euclid to 0.17 2018-02-28 09:46:59 +01:00
webvr_traits Update WR (details below): 2017-10-16 16:33:24 +10:00