1
0
mirror of https://github.com/fluencelabs/wasmer synced 2025-04-14 13:16:05 +00:00

17 lines
534 B
Rust
Raw Normal View History

2018-12-18 13:44:15 +01:00
use super::process::_abort;
2019-01-10 21:37:59 -08:00
use super::env;
use wasmer_runtime::Instance;
/// emscripten: ___cxa_allocate_exception
pub extern "C" fn ___cxa_allocate_exception(size: u32, instance: &mut Instance) -> u32 {
debug!("emscripten::___cxa_allocate_exception");
env::call_malloc(size as _, instance)
}
/// emscripten: ___cxa_throw
/// TODO: We don't have support for exceptions yet
pub extern "C" fn ___cxa_throw(ptr: u32, ty: u32, destructor: u32, instance: &mut Instance) {
debug!("emscripten::___cxa_throw");
2018-12-18 13:44:15 +01:00
_abort();
}