Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/heap.cc

Issue 357263004: Set promotion queue limit before migrating object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 9612ce4c78771e10ba2dbce984052bdec185bb84..c4cf04ad1ed20bff3f813ee8ab220a01d416aa57 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1992,13 +1992,17 @@ class ScavengingVisitor : public StaticVisitorBase {
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
// buffer.
*slot = target;
MigrateObject(heap, object, target, object_size);
- heap->promotion_queue()->SetNewLimit(heap->new_space()->top());
heap->IncrementSemiSpaceCopiedObjectSize(object_size);
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698