mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
script: Simplify ScriptMemoryFailsafe::drop.
This commit is contained in:
parent
2bbde04ccd
commit
eaf69c29ec
1 changed files with 3 additions and 6 deletions
|
@ -498,13 +498,10 @@ impl<'a> ScriptMemoryFailsafe<'a> {
|
||||||
impl<'a> Drop for ScriptMemoryFailsafe<'a> {
|
impl<'a> Drop for ScriptMemoryFailsafe<'a> {
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
match self.owner {
|
if let Some(owner) = self.owner {
|
||||||
Some(owner) => {
|
for (_, document) in owner.documents.borrow().iter() {
|
||||||
for (_, document) in owner.documents.borrow().iter() {
|
document.window().clear_js_runtime_for_script_deallocation();
|
||||||
document.window().clear_js_runtime_for_script_deallocation();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
None => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue