Make ServoParser::pending_input hold onto a BufferQueue

This commit is contained in:
Anthony Ramine 2016-11-16 16:28:30 +01:00
parent 22aebdf5d4
commit a3da819d10
7 changed files with 68 additions and 73 deletions

View file

@ -408,6 +408,12 @@ impl<T: Reflectable> MutNullableHeap<JS<T>> {
}
}
/// Gets the current value out of this object and sets it to `None`.
pub fn take(&self) -> Option<Root<T>> {
let value = self.get();
self.set(None);
value
}
}
impl<T: Reflectable> PartialEq for MutNullableHeap<JS<T>> {