| Index: src/runtime.cc
|
| ===================================================================
|
| --- src/runtime.cc (revision 3315)
|
| +++ src/runtime.cc (working copy)
|
| @@ -1274,7 +1274,9 @@
|
| // Flatten the string. If someone wants to get a char at an index
|
| // in a cons string, it is likely that more indices will be
|
| // accessed.
|
| - subject->TryFlattenIfNotFlat();
|
| + Object* flat = subject->TryFlatten();
|
| + if (flat->IsFailure()) return flat;
|
| + subject = String::cast(flat);
|
| if (i >= static_cast<uint32_t>(subject->length())) {
|
| return Heap::nan_value();
|
| }
|
|
|