bytecodealliance / wasmtime-dotnet

.NET embedding of Wasmtime https://bytecodealliance.github.io/wasmtime-dotnet/
Apache License 2.0
409 stars 52 forks source link

`handle.IsClosed` Checks #289

Closed martindevans closed 8 months ago

martindevans commented 8 months ago

Some previous relevant discussion: https://github.com/bytecodealliance/wasmtime-dotnet/pull/288#issuecomment-1861032709

The handles in wasmtime-dotnet never seem to be made invalid, so the IsInvalid checks seem to be useless. I've added IsClosed checks onto all the places that IsInvalid is used.

Previously all these paths were untested, added new tests which cover these paths.