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

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

Issue 1695233002: wasm - replace the WLL section with support to skip all unknown sections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 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 | « no previous file | test/unittests/wasm/module-decoder-unittest.cc » ('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 62b000da2bfd8b3d5df0b2c612a027ffe0a64946..861c275ce93ab1066e41cdbaab8b415f1d2ff222 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -234,23 +234,16 @@ class ModuleDecoder : public Decoder {
}
break;
}
- case kDeclWLL: {
- // Reserved for experimentation by the Web Low-level Language project
- // which is augmenting the binary encoding with source code meta
- // information. This section does not affect the semantics of the code
- // and can be ignored by the runtime. https://github.com/JSStats/wll
- int length = 0;
- uint32_t section_size = consume_u32v(&length, "section size");
+ default:
+ // All other sections are ignored and skipped. Known experimental
+ // sections: 0x11 WLL https://github.com/JSStats/wll
+ uint32_t section_size = consume_u32("section size");
if (pc_ + section_size > limit_ || pc_ + section_size < pc_) {
- error(pc_ - length, "invalid section size");
+ error(pc_ - 4, "invalid section size");
break;
}
pc_ += section_size;
break;
- }
- default:
- error(pc_ - 1, nullptr, "unrecognized section 0x%02x", section);
- break;
}
}
« no previous file with comments | « no previous file | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698