mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
auto merge of #5040 : Ms2ger/servo/cleanup-unroot, r=jdm
This commit is contained in:
commit
9a5970ccea
1 changed files with 3 additions and 5 deletions
|
@ -634,11 +634,9 @@ impl RootCollection {
|
|||
fn unroot<'b, T: Reflectable>(&self, rooted: &Root<T>) {
|
||||
unsafe {
|
||||
let roots = self.roots.get();
|
||||
debug!("unrooting {:?} (expecting {:?}",
|
||||
(*roots).as_slice().last().unwrap(),
|
||||
rooted.js_ptr);
|
||||
assert!(*(*roots).as_slice().last().unwrap() == rooted.js_ptr);
|
||||
(*roots).pop().unwrap();
|
||||
let unrooted = (*roots).pop().unwrap();
|
||||
debug!("unrooted {:?} (expecting {:?}", unrooted, rooted.js_ptr);
|
||||
assert!(unrooted == rooted.js_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue