Allow extracting the box out of a RootedTraceableBox.#739
Merged
Conversation
86c888a to
ff67f37
Compare
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
ff67f37 to
c8259e1
Compare
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Member
Author
|
b997fd3 is part of this because it's also needed for servo/servo#44464 for identical reasons as RootedTraceableBox::into_box. |
sagudev
approved these changes
May 1, 2026
|
|
||
| pub fn into_box(mut self) -> Box<T> { | ||
| self.cleanup() | ||
| } |
Member
There was a problem hiding this comment.
We should write doc comment here that T is not rooted anymore.
I think we currently do not mark such things as unsafe everytime, but eventually we should (except if we pass &NoGc and bound it's lifetime to return type).
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
9064bbd to
6652b61
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This method is important for making it easier to use typed arrays more safely in Servo. We can pass around RootedTraceableBox values into functions that return heap-allocated objects that need to store the inner
Heapinstead of the RootedTraceableBox.Testing: Added unit test.
Servo PR: servo/servo#44464