Trigger a rule tree gc at the end of DoProcessPendingRestyles.

MozReview-Commit-ID: W2lkQohudA
This commit is contained in:
Bobby Holley 2017-06-16 10:20:25 -07:00
parent e93b7fb3e8
commit a3b32aaa5b

View file

@ -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,