提交 3c038c05 编写于 作者: B Brian Anderson

Document emscripten's unwind impl and remove unused function

上级 badfd620
......@@ -8,6 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Unwinding for emscripten
//!
//! Whereas Rust's usual unwinding implementation for Unix platforms
//! calls into the libunwind APIs directly, on emscripten we instead
//! call into the C++ unwinding APIs. This is just an expedience since
//! emscripten's runtime always implements those APIs and does not
//! implement libunwind.
#![allow(private_no_mangle_fns)]
use core::any::Any;
......@@ -55,12 +63,6 @@ pub unsafe fn panic(data: Box<Any + Send>) -> u32 {
context)
}
#[lang = "eh_unwind_resume"]
#[unwind]
unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: *mut u8) -> ! {
uw::_Unwind_Resume(panic_ctx as *mut uw::_Unwind_Exception);
}
extern {
fn __cxa_allocate_exception(thrown_size: libc::size_t) -> *mut libc::c_void;
fn __cxa_free_exception(thrown_exception: *mut libc::c_void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册