зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #17920 - geckolib: Add friendly panic message to Servo_HasAuthorSpecifiedRules (from heycam:hasr-assertion); r=emilio
This just adds a friendlier panic message when `Servo_HasAuthorSpecifiedRules` is called with an unstyled element. Source-Repo: https://github.com/servo/servo Source-Revision: 0c9abac373e82b25f2162ddcc3e077c96682a3d7 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 5f1eae5e1abc90a7bf36b9e7f4af2dfaaa9d3686
This commit is contained in:
Родитель
1e24731891
Коммит
2c93c4e21f
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче