Untank build after last commit.
authorerik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 31 Mar 2011 11:52:51 +0000 (11:52 +0000)
committererik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 31 Mar 2011 11:52:51 +0000 (11:52 +0000)
Review URL: http://codereview.chromium.org/6728021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects-inl.h

index 39c134a..4465cbe 100644 (file)
@@ -1158,9 +1158,12 @@ void HeapObject::VerifySmiField(int offset) {
 
 
 Heap* HeapObject::GetHeap() {
-  uintptr_t addr = reinterpret_cast<uintptr_t>(this);
-  addr >>= kHeapDescriptorGranularityBits;
-  return heap_descriptors[addr].heap;
+  // During GC, the map pointer in HeapObject is used in various ways that
+  // prevent us from retrieving Heap from the map.
+  // Assert that we are not in GC, implement GC code in a way that it doesn't
+  // pull heap from the map.
+  ASSERT(HEAP->is_safe_to_read_maps());
+  return map()->heap();
 }