| Index: src/handles.cc
|
| diff --git a/src/handles.cc b/src/handles.cc
|
| index a6192d8d6ea24b42b04c6405eb7b490e66b8f014..de4752b88d989582fcc48974c4700cc613007a41 100644
|
| --- a/src/handles.cc
|
| +++ b/src/handles.cc
|
| @@ -915,7 +915,7 @@ int Utf8LengthHelper(String* input,
|
| int total = 0;
|
| bool dummy;
|
| while (true) {
|
| - if (input->IsAsciiRepresentation()) {
|
| + if (input->IsOneByteRepresentation()) {
|
| *starts_with_surrogate = false;
|
| return total + to - from;
|
| }
|
| @@ -948,14 +948,14 @@ int Utf8LengthHelper(String* input,
|
| } else {
|
| if (first_length > from) {
|
| // Left hand side is shorter.
|
| - if (first->IsAsciiRepresentation()) {
|
| + if (first->IsOneByteRepresentation()) {
|
| total += first_length - from;
|
| *starts_with_surrogate = false;
|
| starts_with_surrogate = &dummy;
|
| input = second;
|
| from = 0;
|
| to -= first_length;
|
| - } else if (second->IsAsciiRepresentation()) {
|
| + } else if (second->IsOneByteRepresentation()) {
|
| followed_by_surrogate = false;
|
| total += to - first_length;
|
| input = first;
|
|
|