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

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

Issue 2591753002: [wasm] Implement correct 2-level namespace for imports. (Closed)
Patch Set: Fix debug tests Created 4 years 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/wasm-module.cc ('k') | test/debugger/debug/wasm/frame-inspection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module-builder.cc
diff --git a/src/wasm/wasm-module-builder.cc b/src/wasm/wasm-module-builder.cc
index bf9b4ef198f88300a25e5afd014b5a391aaa213e..eb6956c23766b6c0f75a5d3280cb798fd026e804 100644
--- a/src/wasm/wasm-module-builder.cc
+++ b/src/wasm/wasm-module-builder.cc
@@ -328,10 +328,10 @@ void WasmModuleBuilder::WriteTo(ZoneBuffer& buffer) const {
size_t start = EmitSection(kImportSectionCode, buffer);
buffer.write_size(imports_.size());
for (auto import : imports_) {
- buffer.write_u32v(import.name_length); // module name length
- buffer.write(reinterpret_cast<const byte*>(import.name), // module name
+ buffer.write_u32v(0); // module name length
+ buffer.write_u32v(import.name_length); // field name length
+ buffer.write(reinterpret_cast<const byte*>(import.name), // field name
import.name_length);
- buffer.write_u32v(0); // field name length
buffer.write_u8(kExternalFunction);
buffer.write_u32v(import.sig_index);
}
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/debugger/debug/wasm/frame-inspection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698