-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove DerefMut impl for RootedGuard #572
Conversation
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
7d2905e
to
0a2f765
Compare
Servo's CI is complaining because |
122b04f
to
a54f814
Compare
a54f814
to
21a954b
Compare
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
21a954b
to
da7d6e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but with this GC stuff it's always good to have another pair of eyes.
MutableHandle
viaderef_mut
. Doing so meant that the raw pointer inMutableHandle
was only valid for as long as the mutable reference created inderef_mut
would be. I.e. until the next time GC runs. This is an extension of RootedGuard<T> construction related unsoundness #564, and doesn't require a change in public API.deref_mut
impl entirely, as it's an unsafe footgun that isn't just marked as safe, but is silently invoked.take
function forRootedGuard<Option<T>>
, since that was the primary use ofDerefMut
in servo, and is a safe thing to do.allow_unrooted_interior
toMutableHandle
because the accompanying servo PR requires that crown understandMutableHandle
may point to things that must be rooted over GC passes.Accompanying servo PR: servo/servo#36158
Addresses a small part of #569.