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

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

Issue 2509053003: [wasm] Refactor interface to WasmCompiledModule (Closed)
Patch Set: Created 4 years, 1 month 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-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-objects.h
diff --git a/src/wasm/wasm-objects.h b/src/wasm/wasm-objects.h
index 5d23042622ca671e4b3b2698ab61f9d3ba730c56..1b1dca53ab7b12e57ae999bfdef06b1278ae777c 100644
--- a/src/wasm/wasm-objects.h
+++ b/src/wasm/wasm-objects.h
@@ -157,12 +157,18 @@ class WasmCompiledModule : public FixedArray {
return MaybeHandle<TYPE>(); \
} \
\
- TYPE* ptr_to_##NAME() const { \
+ TYPE* maybe_ptr_to_##NAME() const { \
Object* obj = get(ID); \
if (!obj->Is##TYPE()) return nullptr; \
return TYPE::cast(obj); \
} \
\
+ TYPE* ptr_to_##NAME() const { \
+ Object* obj = get(ID); \
+ DCHECK(obj->Is##TYPE()); \
+ return TYPE::cast(obj); \
+ } \
+ \
void set_##NAME(Handle<TYPE> value) { set_ptr_to_##NAME(*value); } \
\
void set_ptr_to_##NAME(TYPE* value) { set(ID, value); } \
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698