Revision: 5082
Author: [email protected]
Date: Thu Jul 15 08:41:05 2010
Log: Fix TestHeapEntryIdsAndGC test. The assert was wrong.

[email protected]

Review URL: http://codereview.chromium.org/2861051
http://code.google.com/p/v8/source/detail?r=5082

Modified:
 /branches/bleeding_edge/src/profile-generator.cc

=======================================
--- /branches/bleeding_edge/src/profile-generator.cc Thu Jul 15 06:21:50 2010 +++ /branches/bleeding_edge/src/profile-generator.cc Thu Jul 15 08:41:05 2010
@@ -1533,12 +1533,14 @@


 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