Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index 48d5c5b3c249bdd24325e155081d322f9785a4d6..d1084c27789624ed5caf1d070113efa31081840d 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -1745,6 +1745,7 @@ class MarkCompactCollector::EvacuateNewSpaceVisitor final |
const int size = old_object->Size(); |
AllocationAlignment alignment = old_object->RequiredAlignment(); |
AllocationResult allocation; |
+ AllocationSpace space_allocated_in = space_to_allocate_; |
if (space_to_allocate_ == NEW_SPACE) { |
if (size > kMaxLabObjectSize) { |
allocation = |
@@ -1755,11 +1756,12 @@ class MarkCompactCollector::EvacuateNewSpaceVisitor final |
} |
if (allocation.IsRetry() || (space_to_allocate_ == OLD_SPACE)) { |
allocation = AllocateInOldSpace(size, alignment); |
+ space_allocated_in = OLD_SPACE; |
} |
bool ok = allocation.To(target_object); |
DCHECK(ok); |
USE(ok); |
- return space_to_allocate_; |
+ return space_allocated_in; |
} |
inline bool NewLocalAllocationBuffer() { |