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

Unified Diff: src/heap-inl.h

Issue 558016: Strengthen a few assertions and add zapping of allocated... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/spaces.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
===================================================================
--- src/heap-inl.h (revision 3725)
+++ src/heap-inl.h (working copy)
@@ -152,7 +152,11 @@
bool Heap::InNewSpace(Object* object) {
- return new_space_.Contains(object);
+ bool result = new_space_.Contains(object);
+ ASSERT(!result || // Either not in new space
+ gc_state_ != NOT_IN_GC || // ... or in the middle of GC
+ InToSpace(object)); // ... or in to-space (where we allocate).
+ return result;
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698