Skip to content

Commit

Permalink
Trigger a rule tree gc at the end of DoProcessPendingRestyles.
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: W2lkQohudA
  • Loading branch information
bholley committed Jun 16, 2017
1 parent e93b7fb commit a3b32aa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ports/geckolib/glue.rs
Expand Up @@ -303,6 +303,16 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
element.has_dirty_descendants() || element.borrow_data().unwrap().restyle.contains_restyle_data()
}

/// Checks whether the rule tree has crossed its threshold for unused nodes, and
/// if so, frees them.
#[no_mangle]
pub extern "C" fn Servo_MaybeGCRuleTree(raw_data: RawServoStyleSetBorrowed) {
let per_doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
unsafe {
per_doc_data.stylist.rule_tree().maybe_gc();
}
}

#[no_mangle]
pub extern "C" fn Servo_AnimationValues_Interpolate(from: RawServoAnimationValueBorrowed,
to: RawServoAnimationValueBorrowed,
Expand Down

0 comments on commit a3b32aa

Please sign in to comment.