mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Make the rule tree actually threadsafe
RuleTree::gc is now a safe method that any thread can call at any time, and StrongRuleNode values can all be dropped whenever their owner want to, on any thread.
This commit is contained in:
parent
1c2de5641c
commit
7f54d14904
4 changed files with 316 additions and 320 deletions
|
@ -1543,9 +1543,7 @@ impl LayoutThread {
|
|||
}
|
||||
|
||||
// GC the rule tree if some heuristics are met.
|
||||
unsafe {
|
||||
layout_context.style_context.stylist.rule_tree().maybe_gc();
|
||||
}
|
||||
layout_context.style_context.stylist.rule_tree().maybe_gc();
|
||||
|
||||
// Perform post-style recalculation layout passes.
|
||||
if let Some(mut root_flow) = self.root_flow.borrow().clone() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue