| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 6cb8d1a2f2d5b4741f47b5fa0fbd0f54698ef5a4..813f98f684a9b4466ef5bb646f8f86e10e8d72a5 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -6841,7 +6841,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SparseJoinWithSeparator) {
|
| // Find total length of join result.
|
| int string_length = 0;
|
| bool is_ascii = separator->IsAsciiRepresentation();
|
| - int max_string_length = SeqAsciiString::kMaxLength;
|
| + int max_string_length;
|
| + if (is_ascii) {
|
| + max_string_length = SeqAsciiString::kMaxLength;
|
| + } else {
|
| + max_string_length = SeqTwoByteString::kMaxLength;
|
| + }
|
| bool overflow = false;
|
| CONVERT_NUMBER_CHECKED(int, elements_length,
|
| Int32, elements_array->length());
|
|
|