Index: src/v8memory.h |
diff --git a/src/v8memory.h b/src/v8memory.h |
index b1ae939f845949b3dd02b26517385f39c7ae2b32..d34bce77464ae7b09a971875c9398ad3d3893feb 100644 |
--- a/src/v8memory.h |
+++ b/src/v8memory.h |
@@ -64,6 +64,13 @@ class Memory { |
static Handle<Object>& Object_Handle_at(Address addr) { |
return *reinterpret_cast<Handle<Object>*>(addr); |
} |
+ |
+ static bool IsAddressInRange(Address base, Address address, uint32_t size) { |
+ uintptr_t numeric_base = reinterpret_cast<uintptr_t>(base); |
+ uintptr_t numeric_address = reinterpret_cast<uintptr_t>(address); |
+ return numeric_base <= numeric_address && |
+ numeric_address < numeric_base + size; |
+ } |
}; |
} // namespace internal |