fune/servo/components/script/dom/bindings
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
..
codegen 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
callback.rs
cell.rs servo: Merge #19872 - Make JSTraceable for DomRefCell<T> panic if cell is mutably borrowed (from nox:domrefcell-tracing); r=jdm 2018-01-26 08:26:49 -06:00
constant.rs
conversions.rs 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
error.rs
guard.rs
htmlconstructor.rs servo: Merge #19683 - Upgrade to rustc 1.24.0-nightly (0a3761e63 2018-01-03) (from servo:rustup); r=jdm 2018-01-10 14:00:32 -06:00
inheritance.rs
interface.rs servo: Merge #19868 - Use specific assertions (from CYBAI:specific-assertion); r=emilio 2018-01-25 18:06:33 -06:00
iterable.rs 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
mod.rs servo: Merge #19829 - Update Rust and use the newly-stable std::ptr::NonNull (from servo:rustup); r=nox 2018-01-22 11:11:44 -06:00
mozmap.rs
namespace.rs
num.rs
proxyhandler.rs servo: Merge #19683 - Upgrade to rustc 1.24.0-nightly (0a3761e63 2018-01-03) (from servo:rustup); r=jdm 2018-01-10 14:00:32 -06:00
refcounted.rs servo: Merge #19868 - Use specific assertions (from CYBAI:specific-assertion); r=emilio 2018-01-25 18:06:33 -06:00
reflector.rs
root.rs servo: Merge #19829 - Update Rust and use the newly-stable std::ptr::NonNull (from servo:rustup); r=nox 2018-01-22 11:11:44 -06:00
settings_stack.rs servo: Merge #19397 - Implement the create an element for token algorithm (from cbrewster:create_element_for_token); r=jdm,nox 2018-01-17 10:57:06 -06:00
str.rs servo: Merge #19761 - implement range input sanitization (from tigercosmos:m1); r=KiChjang 2018-01-17 04:30:58 -06:00
structuredclone.rs
trace.rs servo: Merge #20267 - Support JS typed arrays as arguments and in WebIDL unions (from Xanewok:typed-arrays-stack-heap-variants); r=Xanewok 2018-03-14 15:43:18 -04:00
utils.rs servo: Merge #19868 - Use specific assertions (from CYBAI:specific-assertion); r=emilio 2018-01-25 18:06:33 -06:00
weakref.rs servo: Merge #19829 - Update Rust and use the newly-stable std::ptr::NonNull (from servo:rustup); r=nox 2018-01-22 11:11:44 -06:00
xmlname.rs