pub fn drain_frame(&mut self, timestamp: Timestamp) -> ApplicationData<T> {
        let mut forward = vec![];
        while !self.inner.current_frame().forward.is_empty() {
            let popped_item = self.pop_forward(timestamp);
            forward.push(popped_item);
        }

        let mut rollbacks = vec![];
        while !self.inner.current_frame().rollbacks.is_empty() {
            let popped_item = self.pop_rollback(timestamp);
            rollbacks.push(popped_item);
        }

        self.pop_frame(timestamp);

        // items are in reversed order:
        ApplicationData {
            forward: forward.into_iter().rev().collect(),
            rollbacks: rollbacks.into_iter().rev().collect(),
        }
    }
Pops the current frame and returns its value
core/lib/multivm/src/versions/vm_m5/history_recorder.rs