зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #19090 - stylo: Remove useless assertions (from emilio:useless-assert); r=bzbarsky
ElementStyles::primary expect()s. Source-Repo: https://github.com/servo/servo Source-Revision: cc53189e67da316eba18aa09b759c0d858dd9e17 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : ad2a60d95a34bebdb02115d63c0d145e7a190703
This commit is contained in:
Родитель
7990325140
Коммит
7d5786c321
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче