Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index d33d91ab4ad8f8e85fca4609b69fa56b5b9f7097..d554a3ba684c10517bc6cbb2cd5620ebceef564c 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2080,7 +2080,7 @@ Object* Heap::AllocateSubString(String* buffer, |
} |
// Make an attempt to flatten the buffer to reduce access time. |
- buffer->TryFlatten(); |
+ buffer = buffer->TryFlattenGetString(); |
Object* result = buffer->IsAsciiRepresentation() |
? AllocateRawAsciiString(length, pretenure ) |