mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #7746 - eefriedman:debug-dead-code, r=nox
Delete dead code. (#[cfg(debug)] is false in every normal servo configuration, and the code in question doesn't compile.) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7746) <!-- Reviewable:end -->
This commit is contained in:
commit
d4f5948294
2 changed files with 0 additions and 35 deletions
|
@ -834,19 +834,6 @@ impl LayoutTask {
|
|||
traversal);
|
||||
}
|
||||
|
||||
/// Verifies that every node was either marked as a leaf or as a nonleaf in the flow tree.
|
||||
/// This is only on in debug builds.
|
||||
#[inline(never)]
|
||||
#[cfg(debug)]
|
||||
fn verify_flow_tree(&self, layout_root: &mut FlowRef) {
|
||||
let mut traversal = traversal::FlowTreeVerification;
|
||||
layout_root.traverse_preorder(&mut traversal);
|
||||
}
|
||||
|
||||
#[cfg(not(debug))]
|
||||
fn verify_flow_tree(&self, _: &mut FlowRef) {
|
||||
}
|
||||
|
||||
fn process_node_geometry_request<'a>(&'a self,
|
||||
requested_node: TrustedNodeAddress,
|
||||
layout_root: &mut FlowRef,
|
||||
|
@ -1338,11 +1325,6 @@ impl LayoutTask {
|
|||
}
|
||||
});
|
||||
|
||||
// Verification of the flow tree, which ensures that all nodes were either marked as
|
||||
// leaves or as non-leaves. This becomes a no-op in release builds. (It is
|
||||
// inconsequential to memory safety but is a useful debugging tool.)
|
||||
self.verify_flow_tree(&mut root_flow);
|
||||
|
||||
if opts::get().trace_layout {
|
||||
layout_debug::begin_trace(root_flow.clone());
|
||||
}
|
||||
|
|
|
@ -292,23 +292,6 @@ impl<'a> PostorderDomTraversal for ConstructFlows<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// The flow tree verification traversal. This is only on in debug builds.
|
||||
#[cfg(debug)]
|
||||
struct FlowTreeVerification;
|
||||
|
||||
#[cfg(debug)]
|
||||
impl PreorderFlow for FlowTreeVerification {
|
||||
#[inline]
|
||||
fn process(&mut self, flow: &mut Flow) {
|
||||
let base = flow::base(flow);
|
||||
if !base.flags.is_leaf() && !base.flags.is_nonleaf() {
|
||||
println!("flow tree verification failed: flow wasn't a leaf or a nonleaf!");
|
||||
flow.dump();
|
||||
panic!("flow tree verification failed")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The bubble-inline-sizes traversal, the first part of layout computation. This computes
|
||||
/// preferred and intrinsic inline-sizes and bubbles them up the tree.
|
||||
pub struct BubbleISizes<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue