mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01: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,11 +346,13 @@ impl BoxSlot<'_> {
|
|||
|
||||
impl Drop for BoxSlot<'_> {
|
||||
fn drop(&mut self) {
|
||||
if !std::thread::panicking() {
|
||||
if let Some(slot) = &mut self.slot {
|
||||
assert!(slot.borrow().is_some(), "failed to set a layout box");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) trait NodeExt<'dom>: 'dom + Copy + LayoutNode<'dom> + Send + Sync {
|
||||
fn is_element(self) -> bool;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue