mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Don't compare the vtable pointers anymore when unrooting stuff
This commit is contained in:
parent
05077d31c8
commit
b5aa83f633
2 changed files with 9 additions and 2 deletions
|
@ -262,7 +262,10 @@ impl RootCollection {
|
|||
unsafe fn unroot(&self, object: *const dyn JSTraceable) {
|
||||
debug_assert!(thread_state::get().is_script());
|
||||
let roots = &mut *self.roots.get();
|
||||
match roots.iter().rposition(|r| *r == object) {
|
||||
match roots
|
||||
.iter()
|
||||
.rposition(|r| *r as *const () == object as *const ())
|
||||
{
|
||||
Some(idx) => {
|
||||
roots.remove(idx);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue