Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 0be534696765b1aac36f37f2c358d50273b0a6a2..320fbb529c3b072b152f00386d467ea9348a0864 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -11539,6 +11539,10 @@ void String::WriteToFlat(String* src, |
// Right hand side is longer. Recurse over left. |
if (from < boundary) { |
WriteToFlat(first, sink, from, boundary); |
+ if (from == 0 && cons_string->second() == first) { |
+ CopyChars(sink + boundary, sink, boundary); |
+ return; |
+ } |
sink += boundary - from; |
from = 0; |
} else { |