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

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

Issue 2394663008: [wasm] Extend wasm object validation to WasmCompiledModule (Closed)
Patch Set: Remove debug code Created 4 years, 2 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.cc » ('j') | 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 bbee2ad889b13806f8334b404e216691ac4d7106..12134acad7fd891c601d44fcc9dc91468e4f7b4b 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -347,6 +347,7 @@ typedef Result<FunctionOffsets> FunctionOffsetsResult;
class WasmCompiledModule : public FixedArray {
public:
static WasmCompiledModule* cast(Object* fixed_array) {
+ SLOW_DCHECK(IsWasmCompiledModule(fixed_array));
return reinterpret_cast<WasmCompiledModule*>(fixed_array);
}
@@ -393,7 +394,7 @@ class WasmCompiledModule : public FixedArray {
MACRO(OBJECT, FixedArray, inits) \
MACRO(OBJECT, FixedArray, startup_function) \
MACRO(OBJECT, FixedArray, indirect_function_tables) \
- MACRO(OBJECT, String, module_bytes) \
+ MACRO(OBJECT, SeqOneByteString, module_bytes) \
MACRO(OBJECT, ByteArray, function_names) \
MACRO(SMALL_NUMBER, uint32_t, min_memory_pages) \
MACRO(OBJECT, FixedArray, data_segments_info) \
@@ -454,6 +455,8 @@ class WasmCompiledModule : public FixedArray {
WCM_PROPERTY_TABLE(DECLARATION)
#undef DECLARATION
+ static bool IsWasmCompiledModule(Object* obj);
+
void PrintInstancesChain();
private:
« no previous file with comments | « no previous file | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698