Add a testing API.

This will allow us to verify the entire detection pipeline in real nightly
builds, which will give us confidence that real heap corruption will be
detected and reported properly.

MozReview-Commit-ID: 43Fp2HT8RYy
This commit is contained in:
Bobby Holley 2017-09-27 23:20:47 -07:00
parent 039fe176b9
commit abd408433f
2 changed files with 17 additions and 0 deletions

View file

@ -4046,3 +4046,9 @@ pub extern "C" fn Servo_HasPendingRestyleAncestor(element: RawGeckoElementBorrow
}
false
}
#[no_mangle]
pub extern "C" fn Servo_CorruptRuleHashAndCrash(set: RawServoStyleSetBorrowed, index: usize) {
let per_doc_data = PerDocumentStyleData::from_ffi(set).borrow();
per_doc_data.stylist.corrupt_rule_hash_and_crash(index);
}