Fix the scope of the ScopeGuard in call_wasm.

This commit is contained in:
Dan Gohman
2018-11-28 13:29:25 -08:00
parent 869ed1b5c5
commit 216c0ce14e

View File

@@ -88,7 +88,7 @@ where
{ {
// In case wasm code calls Rust that panics and unwinds past this point, // In case wasm code calls Rust that panics and unwinds past this point,
// ensure that JMP_BUFS is unwound to its incoming state. // ensure that JMP_BUFS is unwound to its incoming state.
let _ = ScopeGuard::new(); let _guard = ScopeGuard::new();
JMP_BUFS.with(|bufs| { JMP_BUFS.with(|bufs| {
let mut buf = unsafe { mem::uninitialized() }; let mut buf = unsafe { mem::uninitialized() };