Chromium Code Reviews| 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; |
| } |