wasm: removes name node to simplify instantiation path (#1359)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2023-04-12 17:26:18 -07:00
committed by GitHub
parent 1bed2238ad
commit a979e0f643
5 changed files with 110 additions and 199 deletions

View File

@@ -102,7 +102,7 @@ func (m *ModuleInstance) CloseWithExitCode(ctx context.Context, exitCode uint32)
if !m.setExitCode(exitCode, exitCodeFlagResourceClosed) {
return nil // not an error to have already closed
}
_ = m.s.deleteModule(m.moduleListNode)
_ = m.s.deleteModule(m)
return m.ensureResourcesClosed(ctx)
}
@@ -110,7 +110,7 @@ func (m *ModuleInstance) closeWithExitCodeWithoutClosingResource(exitCode uint32
if !m.setExitCode(exitCode, exitCodeFlagResourceNotClosed) {
return nil // not an error to have already closed
}
_ = m.s.deleteModule(m.moduleListNode)
_ = m.s.deleteModule(m)
return nil
}