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

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

Issue 1780483002: [wasm] Support a two-level namespace for imports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index 401fb1823973049a9f616662a79b9699e91c8530..f81b8f440b410219a523c64ee2245d5cac7bb8e3 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -251,7 +251,11 @@ class ModuleDecoder : public Decoder {
} else {
import->sig = module->signatures[import->sig_index];
}
+ const byte* pos = pc_;
import->module_name_offset = consume_string("import module name");
+ if (import->module_name_offset == 0) {
+ error(pos, "import module name cannot be NULL");
+ }
import->function_name_offset =
consume_string("import function name");
}
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698