Chromium Code Reviews| Index: vm/object.h |
| =================================================================== |
| --- vm/object.h (revision 16624) |
| +++ vm/object.h (working copy) |
| @@ -202,6 +202,16 @@ |
| bool IsNew() const { return raw()->IsNewObject(); } |
| bool IsOld() const { return raw()->IsOldObject(); } |
| + bool InVMHeap() const { |
| +#if defined(DEBUG) |
| + if (raw()->IsVMHeapObject()) { |
| + Heap* vm_isolate_heap = Dart::vm_isolate()->heap(); |
| + ASSERT(vm_isolate_heap->Contains(reinterpret_cast<uword>(raw_->ptr()))); |
|
Ivan Posva
2013/01/04 06:42:07
...->Contains(RawObject::ToAddr(raw_))
siva
2013/01/04 18:36:10
Done.
|
| + } |
| +#endif |
| + ASSERT(!Isolate::Current()->heap()->gc_in_progress()); |
|
Ivan Posva
2013/01/04 06:42:07
Can you move this assertion into the RawObject cod
siva
2013/01/04 18:36:10
Done.
|
| + return raw()->IsVMHeapObject(); |
| + } |
| // Print the object on stdout for debugging. |
| void Print() const; |