mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 13:11:32 +00:00
Full preemptive snapshot/resume.
This commit is contained in:
@ -17,6 +17,7 @@ impl FunctionMiddleware for CallTrace {
|
||||
Event::Internal(InternalEvent::FunctionBegin(id)) => sink.push(Event::Internal(
|
||||
InternalEvent::Breakpoint(Box::new(move |_| {
|
||||
eprintln!("func ({})", id);
|
||||
Ok(())
|
||||
})),
|
||||
)),
|
||||
_ => {}
|
||||
|
@ -94,11 +94,9 @@ impl FunctionMiddleware for Metering {
|
||||
sink.push(Event::WasmOwned(Operator::If {
|
||||
ty: WpType::EmptyBlockType,
|
||||
}));
|
||||
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(
|
||||
move |ctx| unsafe {
|
||||
(ctx.throw)(Box::new(ExecutionLimitExceededError));
|
||||
},
|
||||
))));
|
||||
sink.push(Event::Internal(InternalEvent::Breakpoint(Box::new(|_| {
|
||||
Err(Box::new(ExecutionLimitExceededError))
|
||||
}))));
|
||||
sink.push(Event::WasmOwned(Operator::End));
|
||||
}
|
||||
_ => {}
|
||||
|
Reference in New Issue
Block a user