Reviewers: Mads Ager,

Description:
Fix TestHeapEntryIdsAndGC test. The assert was wrong.

[email protected]

Please review this at http://codereview.chromium.org/2861051/show

Affected files:
  M src/profile-generator.cc


Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 4e0cb7111ba5dffba88e5e79c04ba95f97314349..9ec6b7d2d0b90eca556853ceec787d4036e5324d 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -1533,12 +1533,14 @@ uint64_t HeapObjectsMap::FindObject(Address addr) {


 void HeapObjectsMap::MoveObject(Address from, Address to) {
+  if (from == to) return;
HashMap::Entry* entry = entries_map_.Lookup(from, AddressHash(from), false);
   if (entry != NULL) {
     void* value = entry->value;
     entries_map_.Remove(from, AddressHash(from));
     entry = entries_map_.Lookup(to, AddressHash(to), true);
-    ASSERT(entry->value == NULL);
+ // We can have an entry at the new location, it is OK, as GC can overwrite
+    // dead objects with alive objects being moved.
     entry->value = value;
   }
 }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to