Remove unneed dynamic binding in MemoryBinding.

The Validate function already checks that the field type is Memory.
This commit is contained in:
Austin Wise
2019-12-13 17:25:08 -08:00
parent 7f05a2e6a5
commit 96d6a16ce9

View File

@@ -45,7 +45,7 @@ namespace Wasmtime.Bindings
internal override SafeHandle Bind(Store store, IHost host) internal override SafeHandle Bind(Store store, IHost host)
{ {
dynamic memory = Field.GetValue(host); Memory memory = (Memory)Field.GetValue(host);
if (memory.Handle != null) if (memory.Handle != null)
{ {
throw new InvalidOperationException("Cannot bind more than once."); throw new InvalidOperationException("Cannot bind more than once.");