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

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

Issue 1608743006: [wasm] Verify boundaries of data segments when decoding modules. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-opcodes.h » ('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 167667e02edd2ae90aa7b189e0deddcb685f49d7..6e28f8757ca42423d141596cc1768395f7664f92 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -31,18 +31,8 @@ std::ostream& operator<<(std::ostream& os, const WasmModule& module) {
std::ostream& operator<<(std::ostream& os, const WasmFunction& function) {
- os << "WASM function with signature ";
+ os << "WASM function with signature " << *function.sig;
- // TODO(titzer): factor out rendering of signatures.
- if (function.sig->return_count() == 0) os << "v";
- for (size_t i = 0; i < function.sig->return_count(); i++) {
- os << WasmOpcodes::ShortNameOf(function.sig->GetReturn(i));
- }
- os << "_";
- if (function.sig->parameter_count() == 0) os << "v";
- for (size_t i = 0; i < function.sig->parameter_count(); i++) {
- os << WasmOpcodes::ShortNameOf(function.sig->GetParam(i));
- }
os << " locals: ";
if (function.local_int32_count)
os << function.local_int32_count << " int32s ";
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698