Revision: 22079
Author:   [email protected]
Date:     Mon Jun 30 08:02:38 2014 UTC
Log:      Set promotion queue limit before migrating object.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/357263004
http://code.google.com/p/v8/source/detail?r=22079

Modified:
 /branches/bleeding_edge/src/heap.cc

=======================================
--- /branches/bleeding_edge/src/heap.cc Fri Jun 27 12:10:43 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Mon Jun 30 08:02:38 2014 UTC
@@ -1991,6 +1991,11 @@
       if (alignment != kObjectAlignment) {
         target = EnsureDoubleAligned(heap, target, allocation_size);
       }
+
+      // Order is important here: Set the promotion limit before migrating
+      // the object. Otherwise we may end up overwriting promotion queue
+      // entries when we migrate the object.
+      heap->promotion_queue()->SetNewLimit(heap->new_space()->top());

       // Order is important: slot might be inside of the target if target
       // was allocated over a dead object and slot comes from the store
@@ -1998,7 +2003,6 @@
       *slot = target;
       MigrateObject(heap, object, target, object_size);

-      heap->promotion_queue()->SetNewLimit(heap->new_space()->top());
       heap->IncrementSemiSpaceCopiedObjectSize(object_size);
       return true;
     }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to