mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Fix destructor in emcc.rs
This commit is contained in:
@@ -88,8 +88,12 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
|
||||
}
|
||||
extern "C" fn exception_cleanup(ptr: *mut libc::c_void) -> DestructorRet {
|
||||
unsafe {
|
||||
ptr::drop_in_place(ptr as *mut Exception);
|
||||
super::__rust_drop_panic();
|
||||
if let Some(b) = (ptr as *mut Exception).read().data {
|
||||
drop(b);
|
||||
super::__rust_drop_panic();
|
||||
}
|
||||
#[cfg(any(target_arch = "arm", target_arch = "wasm32"))]
|
||||
ptr
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user