mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Don't panic while already panicking in BoxSlot::drop
This commit is contained in:
parent
50bd5c3e0f
commit
f4c4af2bd4
1 changed files with 4 additions and 2 deletions
|
@ -346,8 +346,10 @@ impl BoxSlot<'_> {
|
|||
|
||||
impl Drop for BoxSlot<'_> {
|
||||
fn drop(&mut self) {
|
||||
if let Some(slot) = &mut self.slot {
|
||||
assert!(slot.borrow().is_some(), "failed to set a layout box");
|
||||
if !std::thread::panicking() {
|
||||
if let Some(slot) = &mut self.slot {
|
||||
assert!(slot.borrow().is_some(), "failed to set a layout box");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue