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

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

Issue 1565693002: WASM: Reserve an ignored section for source code meta information. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix some mis-uses of EXPECT_FAILURE to resolve memory leaks in the tests. Created 4 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 | « no previous file | 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 349a4e5f56ddeb73c181e82dba0dcdd8189cf91c..0b92247558175818e5af9c574b52cedfe1da0c60 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -181,6 +181,20 @@ 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;
+ uint32_t section_size = u32v(&length, "section size");
+ if (pc_ + section_size > limit_ || pc_ + section_size < pc_) {
+ error(pc_ - length, "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 | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698