mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout_thread: Add an assertion that reflows destined for the display
have no layout queries, and vice versa. We should clean this up, but let's enforce it with an assert for now.
This commit is contained in:
parent
22ba0e16e0
commit
1235f4bff6
1 changed files with 6 additions and 0 deletions
|
@ -1038,6 +1038,12 @@ impl LayoutThread {
|
|||
let document = unsafe { ServoLayoutNode::new(&data.document) };
|
||||
let document = document.as_document().unwrap();
|
||||
|
||||
// FIXME(pcwalton): Combine `ReflowGoal` and `ReflowQueryType`. Then remove this assert.
|
||||
debug_assert!((data.reflow_info.goal == ReflowGoal::ForDisplay &&
|
||||
data.query_type == ReflowQueryType::NoQuery) ||
|
||||
(data.reflow_info.goal == ReflowGoal::ForScriptQuery &&
|
||||
data.query_type != ReflowQueryType::NoQuery));
|
||||
|
||||
debug!("layout: received layout request for: {}", self.url);
|
||||
|
||||
let mut rw_data = possibly_locked_rw_data.lock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue