Exposes Module.IsClosed to prevent calling functions when closed (#1573)
Signed-off-by: Adrian Cole <adrian@tetrate.io> Co-authored-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
@@ -320,7 +320,8 @@ func (r *runtime) InstantiateModule(
|
||||
return
|
||||
}
|
||||
|
||||
// Attach the code closer so that anything afterwards closes the compiled code when closing the module.
|
||||
// Attach the code closer so that anything afterward closes the compiled
|
||||
// code when closing the module.
|
||||
if code.closeWithModule {
|
||||
mod.(*wasm.ModuleInstance).CodeCloser = code
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user