Refactor: Use InvokeContext in all Syscalls (#21545)
* Adds ComputeMeter::mock_set_remaining(). * Adds InvokeContext::get_loader() * Adds a LogCollector to InvokeContext::new_mock(). * Adds "invoke_context: Rc<RefCell<&'a mut dyn InvokeContext>>," to all SyscallObjects. * Adds LogCollector::get_recorded_content(). * Removes loader_id parameter from bind_syscall_context_objects() and create_vm().
This commit is contained in:
committed by
GitHub
parent
9079de825b
commit
6330cbcf33
@ -24,6 +24,10 @@ impl LogCollector {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_recorded_content(&self) -> &[String] {
|
||||
self.messages.as_slice()
|
||||
}
|
||||
|
||||
pub fn new_ref() -> Rc<RefCell<Self>> {
|
||||
Rc::new(RefCell::new(Self::default()))
|
||||
}
|
||||
|
Reference in New Issue
Block a user