servo/components
bors-servo 23b6f569d0
Auto merge of #20314 - Xanewok:remove-heap-constructor, r=jdm
Don't use unsafe Heap::new constructor

<!-- Please describe your changes on the following line: -->
Pulls https://github.com/servo/rust-mozjs/pull/398 and aims to close https://github.com/servo/rust-mozjs/issues/343.

We can't convert from `JSVal` to `Heap<JSVal>` safely (due to GC barriers we can't move Heap value after changing its underlying value to something meaningful, e.g. non-null or non-undefined), so I decided to also wrap the Heap values in a Box (and in dictionaries in RootedTraceableBox, see https://github.com/servo/servo/pull/20265#issuecomment-372838379 and the issue for more details) in dictionaries.

Since we allocate more to be safe, I think it'd be good to also do some sort of a JS perf run, if there is any to see if there's any significant overhead.

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
- [X] These changes do not require tests because checking for not moving Heap after setting a value would require encoding a lot more info in type system (Heap) and I'm not sure how to do that and end up with an ergonomic and consistent API

<!-- 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/20314)
<!-- Reviewable:end -->
2018-03-18 15:22:23 -04:00
..
allocator
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
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 Auto merge of #20071 - paulrouget:typedsize, r=glennw 2018-03-16 17:18:24 -04:00
config Update the MULTIPROCESS static when changing default options 2018-03-15 16:23:40 -07: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
devtools_traits
dom_struct
domobject_derive Bump syn/quote in domobject_derive 2018-02-12 17:07:40 +01:00
fallible
geometry alias some euclid types 2018-03-16 14:34:29 +08:00
gfx Update to handle WebRender API changes 2018-03-16 12:00:04 +10:00
gfx_traits
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 Update to handle WebRender API changes 2018-03-16 12:00:04 +10:00
layout_thread style: Add infrastructure to match :host. 2018-03-14 15:10:05 +01:00
layout_traits
malloc_size_of Use mozjs 0.3 fork without Heap::new 2018-03-16 16:53:18 +01:00
malloc_size_of_derive Bump syn/quote in malloc_size_of_derive 2018-02-12 17:08:19 +01:00
metrics
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
profile Add tool to chart memory usage from reports. 2018-03-08 22:46:42 -05:00
profile_traits
rand
range
remutex
script Auto merge of #20314 - Xanewok:remove-heap-constructor, r=jdm 2018-03-18 15:22:23 -04:00
script_layout_interface Bump euclid to 0.17 2018-02-28 09:46:59 +01:00
script_plugins
script_traits alias some euclid types 2018-03-16 14:34:29 +08:00
selectors style: Add infrastructure to match :host. 2018-03-14 15:10:05 +01:00
servo Auto merge of #20316 - UK992:win32-icon, r=jdm 2018-03-18 14:31:35 -04:00
servo_arc Fix license metadata for servo_arc crate 2018-02-21 16:35:18 -08:00
size_of_test
style Have servo report traversal statistics to gecko. 2018-03-15 11:57:52 +11: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
webdriver_server Use typed coordinates. 2018-03-16 14:34:29 +08:00
webvr Bump euclid to 0.17 2018-02-28 09:46:59 +01:00
webvr_traits