mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-22 17:21:35 +00:00
Preserve the function table explicitly (#1970)
The main gc pass of unused items in wasm-bindgen was accidentally removing the function table because we weren't properly rooting it in the auxiliary section which has a few ways that imports can reference the function table via intrinsics and closures. Closes #1967
This commit is contained in:
crates
@ -2889,7 +2889,7 @@ impl<'a> Context<'a> {
|
||||
}
|
||||
|
||||
fn export_function_table(&mut self) -> Result<String, Error> {
|
||||
match self.module.tables.main_function_table()? {
|
||||
match self.aux.function_table {
|
||||
Some(id) => Ok(self.export_name_of(id)),
|
||||
None => bail!("no function table found in module"),
|
||||
}
|
||||
|
Reference in New Issue
Block a user