Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Unified Diff: src/handles.cc

Issue 11308066: Rename IsAsciiRepresentation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.cc ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/factory.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698