mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Print element name when panicking in ThreadSafeLayoutElement::style_data
This commit is contained in:
parent
f4c4af2bd4
commit
45f1316c62
1 changed files with 4 additions and 1 deletions
|
@ -1307,7 +1307,10 @@ impl<'le> ThreadSafeLayoutElement<'le> for ServoThreadSafeLayoutElement<'le> {
|
|||
}
|
||||
|
||||
fn style_data(&self) -> AtomicRef<ElementData> {
|
||||
self.element.borrow_data().expect("Unstyled layout node?")
|
||||
match self.element.borrow_data() {
|
||||
Some(data) => data,
|
||||
None => panic!("could not find styles for <{}>", self.element.local_name()),
|
||||
}
|
||||
}
|
||||
|
||||
fn is_shadow_host(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue