mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 21:58:20 +00:00
Merge branch 'master' into feature/host-env-prototype
This commit is contained in:
12
lib/c-api/src/wasm_c_api/externals/function.rs
vendored
12
lib/c-api/src/wasm_c_api/externals/function.rs
vendored
@@ -60,7 +60,8 @@ pub unsafe extern "C" fn wasm_func_new(
|
||||
|
||||
if !trap.is_null() {
|
||||
let trap: Box<wasm_trap_t> = Box::from_raw(trap);
|
||||
RuntimeError::raise(Box::new(trap.inner));
|
||||
|
||||
return Err(trap.inner);
|
||||
}
|
||||
|
||||
let processed_results = results
|
||||
@@ -119,8 +120,13 @@ pub unsafe extern "C" fn wasm_func_new_with_env(
|
||||
]
|
||||
.into();
|
||||
|
||||
let _traps = callback(env.0, &processed_args, &mut results);
|
||||
// TODO: do something with `traps`
|
||||
let trap = callback(env.0, &processed_args, &mut results);
|
||||
|
||||
if !trap.is_null() {
|
||||
let trap: Box<wasm_trap_t> = Box::from_raw(trap);
|
||||
|
||||
return Err(trap.inner);
|
||||
}
|
||||
|
||||
let processed_results = results
|
||||
.into_slice()
|
||||
|
||||
Reference in New Issue
Block a user