Chromium Code Reviews| Index: src/heap.cc |
| diff --git a/src/heap.cc b/src/heap.cc |
| index 9d8a6fad9954d96eb3576d25a90630a29277d794..623ec31e20fca8169ba724e5be33a5f736511a34 100644 |
| --- a/src/heap.cc |
| +++ b/src/heap.cc |
| @@ -4013,10 +4013,10 @@ MaybeObject* Heap::AllocateByteArray(int length, PretenureFlag pretenure) { |
| return AllocateByteArray(length); |
| } |
| int size = ByteArray::SizeFor(length); |
| + AllocationSpace space = |
| + (size > Page::kMaxNonCodeHeapObjectSize) ? LO_SPACE : OLD_DATA_SPACE; |
| Object* result; |
| - { MaybeObject* maybe_result = (size <= Page::kMaxNonCodeHeapObjectSize) |
| - ? old_data_space_->AllocateRaw(size) |
| - : lo_space_->AllocateRaw(size, NOT_EXECUTABLE); |
| + { MaybeObject* maybe_result = AllocateRaw(size, space, space); |
|
Hannes Payer (out of office)
2013/08/16 13:56:28
We should use AllocateRaw in all Allocate* functio
Michael Starzinger
2013/08/16 15:10:54
Yes, I wholeheartedly agree. It's on my plate as a
|
| if (!maybe_result->ToObject(&result)) return maybe_result; |
| } |