mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: Assert we don't try to share against ourselves.
This commit is contained in:
parent
891bc7d174
commit
a5842165d9
1 changed files with 1 additions and 0 deletions
|
@ -751,6 +751,7 @@ impl<E: TElement> StyleSharingCache<E> {
|
||||||
target: E,
|
target: E,
|
||||||
) -> Option<PrimaryStyle> {
|
) -> Option<PrimaryStyle> {
|
||||||
self.cache_mut().lookup(|candidate| {
|
self.cache_mut().lookup(|candidate| {
|
||||||
|
debug_assert_ne!(candidate.element, target);
|
||||||
if !candidate.parent_style_identity().eq(inherited) {
|
if !candidate.parent_style_identity().eq(inherited) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue