Use table min and max values from module to generate environment table

This commit is contained in:
Brandon Fish
2019-01-25 19:55:33 -06:00
parent 5209b5a558
commit 1a1958a0ce
4 changed files with 25 additions and 10 deletions

View File

@ -15,8 +15,8 @@ macro_rules! assert_emscripten_output {
// let module = compile(&wasm_bytes[..])
// .map_err(|err| format!("Can't create the WebAssembly module: {}", err)).unwrap(); // NOTE: Need to figure what the unwrap is for ??
let mut emscripten_globals = EmscriptenGlobals::new();
let (table_min, table_max) = wasmer_emscripten::get_emscripten_table_size(&module);
let mut emscripten_globals = EmscriptenGlobals::new(table_min, table_max);
let import_object = generate_emscripten_env(&mut emscripten_globals);
let mut instance = module.instantiate(import_object)