#24468 add a update_entry method to Performance

This commit is contained in:
Shinichi Morimoto 2019-12-08 00:51:39 +09:00 committed by Josh Matthews
parent 91287216f5
commit baf2b6e4ab

View file

@ -371,6 +371,12 @@ impl Performance {
.push_back(DomRoot::from_ref(entry));
false
}
pub fn update_entry(&self, index: usize, entry: &PerformanceEntry) {
if let Some(e) = self.buffer.borrow_mut().entries.get_mut(index) {
*e = DomRoot::from_ref(entry);
}
}
}
impl PerformanceMethods for Performance {