mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #17920 - heycam:hasr-assertion, r=emilio
geckolib: Add friendly panic message to Servo_HasAuthorSpecifiedRules. This just adds a friendlier panic message when `Servo_HasAuthorSpecifiedRules` is called with an unstyled element. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17920) <!-- Reviewable:end -->
This commit is contained in:
commit
0c9abac373
1 changed files with 4 additions and 1 deletions
|
@ -1610,7 +1610,10 @@ pub extern "C" fn Servo_HasAuthorSpecifiedRules(element: RawGeckoElementBorrowed
|
|||
{
|
||||
let element = GeckoElement(element);
|
||||
|
||||
let data = element.borrow_data().unwrap();
|
||||
let data =
|
||||
element.borrow_data()
|
||||
.expect("calling Servo_HasAuthorSpecifiedRules on an unstyled element");
|
||||
|
||||
let primary_style = data.styles.primary();
|
||||
|
||||
let guard = (*GLOBAL_STYLE_DATA).shared_lock.read();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue