gecko-dev/servo/components/script
Igor Matuszewski 8d9de62f85 servo: Merge #20314 - Don't use unsafe Heap::new constructor (from Xanewok:remove-heap-constructor); r=jdm
<!-- 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. -->

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

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c609cd593bbb75cbbe584687a7caf814de3059fc
2018-03-18 15:22:23 -04:00
..
docs
dom servo: Merge #20314 - Don't use unsafe Heap::new constructor (from Xanewok:remove-heap-constructor); r=jdm 2018-03-18 15:22:23 -04:00
task_source
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
Cargo.toml servo: Merge #20314 - Don't use unsafe Heap::new constructor (from Xanewok:remove-heap-constructor); r=jdm 2018-03-18 15:22:23 -04:00
body.rs
build.rs
clipboard_provider.rs
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
layout_image.rs
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
microtask.rs
network_listener.rs
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
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
test.rs
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
unpremultiplytable.rs
webdriver_handlers.rs