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

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

Issue 1634653002: [wasm] register WASM code creation event for profilers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: GetName only checks bounds when there is a memory section since some wasm test cases does not have … 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/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.h
diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
index 5e84945da9a6d3828b90e8589a2dff56b1babd57..5dde60db8ca8da88f1c87e9634b091d70807717d 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -105,8 +105,8 @@ struct WasmModule {
// Get a pointer to a string stored in the module bytes representing a name.
const char* GetName(uint32_t offset) {
- CHECK(BoundsCheck(offset, offset + 1));
if (offset == 0) return "<?>"; // no name.
+ CHECK(BoundsCheck(offset, offset + 1));
return reinterpret_cast<const char*>(module_start + offset);
}
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698