Index: src/wasm/wasm-module.cc |
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc |
index 2e36978440e326751a7e9348377bd0e76b186469..4d8b60fdf2269b302d6992c4cd165e1b5a7fb5e1 100644 |
--- a/src/wasm/wasm-module.cc |
+++ b/src/wasm/wasm-module.cc |
@@ -1658,6 +1658,9 @@ class WasmInstanceBuilder { |
break; |
} |
case kExternalMemory: { |
+ // Validation should have failed if more than one memory object was |
+ // provided. |
+ DCHECK(!instance->has_memory_object()); |
if (!WasmJs::IsWasmMemoryObject(isolate_, value)) { |
ReportLinkError("memory import must be a WebAssembly.Memory object", |
index, module_name, import_name); |