Index: src/heap-inl.h |
diff --git a/src/heap-inl.h b/src/heap-inl.h |
index 3c1d4d274ba883a854d794f9eeef7763a4bb1dd9..1e52d6b718ff9c0e190a99c03a6f4fbaf95c1561 100644 |
--- a/src/heap-inl.h |
+++ b/src/heap-inl.h |
@@ -140,12 +140,11 @@ MaybeObject* Heap::AllocateOneByteInternalizedString(Vector<const uint8_t> str, |
// Compute map and object size. |
Map* map = ascii_internalized_string_map(); |
int size = SeqOneByteString::SizeFor(str.length()); |
+ AllocationSpace space = SelectSpace(size, OLD_DATA_SPACE, TENURED); |
// Allocate string. |
Object* result; |
- { MaybeObject* maybe_result = (size > Page::kMaxNonCodeHeapObjectSize) |
- ? lo_space_->AllocateRaw(size, NOT_EXECUTABLE) |
- : old_data_space_->AllocateRaw(size); |
+ { MaybeObject* maybe_result = AllocateRaw(size, space, OLD_DATA_SPACE); |
if (!maybe_result->ToObject(&result)) return maybe_result; |
} |
@@ -174,12 +173,11 @@ MaybeObject* Heap::AllocateTwoByteInternalizedString(Vector<const uc16> str, |
// Compute map and object size. |
Map* map = internalized_string_map(); |
int size = SeqTwoByteString::SizeFor(str.length()); |
+ AllocationSpace space = SelectSpace(size, OLD_DATA_SPACE, TENURED); |
// Allocate string. |
Object* result; |
- { MaybeObject* maybe_result = (size > Page::kMaxNonCodeHeapObjectSize) |
- ? lo_space_->AllocateRaw(size, NOT_EXECUTABLE) |
- : old_data_space_->AllocateRaw(size); |
+ { MaybeObject* maybe_result = AllocateRaw(size, space, OLD_DATA_SPACE); |
if (!maybe_result->ToObject(&result)) return maybe_result; |
} |