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

Unified Diff: src/heap.h

Issue 23781006: Add assertion to UniqueValueId constructor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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
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]);
}
« no previous file with comments | « src/handles-inl.h ('k') | src/hydrogen.cc » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698