Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 881020c5af8a54902d1e80e75d24e4cfb39d1b7e..56d1415ce5be15edbf1ff8134f7168766b6c025b 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -9778,6 +9778,7 @@ static MaybeObject* Allocate(Isolate* isolate, |
bool double_align, |
AllocationSpace space) { |
Heap* heap = isolate->heap(); |
+ if (double_align) size += kPointerSize; |
RUNTIME_ASSERT(IsAligned(size, kPointerSize)); |
RUNTIME_ASSERT(size > 0); |
RUNTIME_ASSERT(size <= heap->MaxRegularSpaceAllocationSize()); |
@@ -9789,6 +9790,9 @@ static MaybeObject* Allocate(Isolate* isolate, |
MemoryChunk* chunk = MemoryChunk::FromAddress(allocation->address()); |
ASSERT(chunk->owner()->identity() == space); |
#endif |
+ if (double_align) { |
+ allocation = heap->EnsureDoubleAligned(allocation, size); |
+ } |
heap->CreateFillerObjectAt(allocation->address(), size); |
return allocation; |
} |