| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 0ca745a4f3660c27defca27711b2bac9f8d0bec5..2b24ab07f64fa25763a73ebac503d89508567dae 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -4055,14 +4055,6 @@ int String::Length() const {
|
| return str->length();
|
| }
|
|
|
| -bool String::MayContainNonAscii() const {
|
| - i::Handle<i::String> str = Utils::OpenHandle(this);
|
| - if (IsDeadCheck(str->GetIsolate(), "v8::String::MayContainNonAscii()")) {
|
| - return false;
|
| - }
|
| - return !str->HasOnlyAsciiChars();
|
| -}
|
| -
|
|
|
| bool String::IsOneByte() const {
|
| i::Handle<i::String> str = Utils::OpenHandle(this);
|
| @@ -4516,25 +4508,6 @@ int String::WriteAscii(char* buffer,
|
| FlattenString(str); // Flatten the string for efficiency.
|
| }
|
|
|
| - if (str->HasOnlyAsciiChars()) {
|
| - // WriteToFlat is faster than using the StringCharacterStream.
|
| - if (length == -1) length = str->length() + 1;
|
| - int len = i::Min(length, str->length() - start);
|
| - i::String::WriteToFlat(*str,
|
| - reinterpret_cast<uint8_t*>(buffer),
|
| - start,
|
| - start + len);
|
| - if (!(options & PRESERVE_ASCII_NULL)) {
|
| - for (int i = 0; i < len; i++) {
|
| - if (buffer[i] == '\0') buffer[i] = ' ';
|
| - }
|
| - }
|
| - if (!(options & NO_NULL_TERMINATION) && length > len) {
|
| - buffer[len] = '\0';
|
| - }
|
| - return len;
|
| - }
|
| -
|
| int end = length;
|
| if ((length == -1) || (length > str->length() - start)) {
|
| end = str->length() - start;
|
|
|