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 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 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 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 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 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 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 Update WR (details below): 2017-10-16 16:33:24 +10:00
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 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 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 Make the unrooted_must_root conditional on a default Cargo feature. 2017-11-02 15:08:04 +01:00
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 Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
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 Update WR (details below): 2017-10-16 16:33:24 +10:00