Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index 4dfa076ebd7745c14e953cbf0deb3bd396eb5c5a..8bd3b0d7f0943181e7a980787f47dae6ca621ac3 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -1414,6 +1414,12 @@ class Heap { |
// Generated code can embed this address to get access to the roots. |
Object** roots_array_start() { return roots_; } |
+#ifdef DEBUG |
+ bool IsInRootsArray(Object** handle) { |
+ return roots_ <= handle && handle < roots_ + Heap::kStrongRootListLength; |
+ } |
+#endif |
+ |
Address* store_buffer_top_address() { |
return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]); |
} |