Temporarily convert existing cfg(debug_assertions) crashes to warnings (#30578)

This commit is contained in:
Delan Azabani 2023-10-18 21:16:11 +08:00 committed by GitHub
parent 351b5036bf
commit 66258bfbbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 53 additions and 16 deletions

View file

@ -1376,7 +1376,11 @@ impl MutableOwnedFlowUtils for FlowRef {
let base = FlowRef::deref_mut(self).mut_base();
for descendant_link in abs_descendants.descendant_links.iter_mut() {
debug_assert!(!descendant_link.has_reached_containing_block);
// TODO(servo#30573) revert to debug_assert!() once underlying bug is fixed
#[cfg(debug_assertions)]
if !(!descendant_link.has_reached_containing_block) {
log::warn!("debug assertion failed! !descendant_link.has_reached_containing_block");
}
let descendant_base = FlowRef::deref_mut(&mut descendant_link.flow).mut_base();
descendant_base.absolute_cb.set(this.clone());
}