diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-03-23 13:06:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-23 13:06:01 -0400 |
commit | 18ef5874dd3e11551e2f9503746540847eeb974c (patch) | |
tree | ae1fa73e8c0a2a1807e98990afdc038c9d788a59 /components/script/dom/webgl2renderingcontext.rs | |
parent | 4a6453ac9ad956502ec6d39093b83820d94a409e (diff) | |
parent | f7c039516ce946b6dfe99a6936cf7f8ece72802b (diff) | |
download | servo-18ef5874dd3e11551e2f9503746540847eeb974c.tar.gz servo-18ef5874dd3e11551e2f9503746540847eeb974c.zip |
Auto merge of #20399 - Xanewok:remove-heap-handle-mut, r=jdm
Sanitize Heap::handle(_mut) functions
<!-- Please describe your changes on the following line: -->
Complementary to https://github.com/servo/rust-mozjs/pull/404.
Removing `Heap::handle_mut` didn't warrant any changes on Servo side, and so the changes here are only to fix compilation with `Heap::handle` being now marked as `unsafe`.
The main idea is that we can't hand out handles to heap values themselves, since they're not guaranteed to be rooted, but it's safe to do when we are - hence why the safe impl on `RootedTraceableBox<Heap<T>>` and why it's safe to use inside structs that hold a Heap and are `#[must_root]`.
---
<!-- 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 the compiler forces correctness here.
<!-- 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/20399)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webgl2renderingcontext.rs')
0 files changed, 0 insertions, 0 deletions