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); } \ |