mirror of
https://github.com/servo/servo.git
synced 2025-07-16 03:43:38 +01:00
Auto merge of #19090 - emilio:useless-assert, r=bzbarsky
stylo: Remove useless assertions. ElementStyles::primary expect()s. <!-- 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/19090) <!-- Reviewable:end -->
This commit is contained in:
commit
cc53189e67
1 changed files with 0 additions and 3 deletions
|
@ -965,7 +965,6 @@ pub extern "C" fn Servo_Element_GetPrimaryComputedValues(element: RawGeckoElemen
|
|||
{
|
||||
let element = GeckoElement(element);
|
||||
let data = element.borrow_data().expect("Getting CVs on unstyled element");
|
||||
assert!(data.has_styles(), "Getting CVs on unstyled element");
|
||||
data.styles.primary().clone().into()
|
||||
}
|
||||
|
||||
|
@ -3455,8 +3454,6 @@ pub extern "C" fn Servo_ResolveStyle(
|
|||
let data =
|
||||
element.borrow_data().expect("Resolving style on unstyled element");
|
||||
|
||||
// TODO(emilio): Downgrade to debug assertions when close to release.
|
||||
assert!(data.has_styles(), "Resolving style on unstyled element");
|
||||
debug_assert!(element.has_current_styles(&*data),
|
||||
"Resolving style on {:?} without current styles: {:?}", element, data);
|
||||
data.styles.primary().clone().into()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue