mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Fix destructor in emcc.rs
This commit is contained in:
parent
4f163afed6
commit
25519e5290
@ -88,9 +88,13 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
extern "C" fn exception_cleanup(ptr: *mut libc::c_void) -> DestructorRet {
|
||||
unsafe {
|
||||
ptr::drop_in_place(ptr as *mut Exception);
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
#[lang = "eh_personality"]
|
||||
|
Loading…
Reference in New Issue
Block a user