Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(842)

Unified Diff: src/wasm/wasm-module.cc

Issue 2624853002: [wasm] JS API tests for `WebAssembly.validate` (Closed)
Patch Set: addressed feedback Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | test/mjsunit/wasm/js-api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | test/mjsunit/wasm/js-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698