mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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> {
|
||||
#[allow(unrooted_must_root)]
|
||||
fn drop(&mut self) {
|
||||
match self.owner {
|
||||
Some(owner) => {
|
||||
for (_, document) in owner.documents.borrow().iter() {
|
||||
document.window().clear_js_runtime_for_script_deallocation();
|
||||
}
|
||||
if let Some(owner) = self.owner {
|
||||
for (_, document) in owner.documents.borrow().iter() {
|
||||
document.window().clear_js_runtime_for_script_deallocation();
|
||||
}
|
||||
None => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue