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

Unified Diff: src/objects-inl.h

Issue 14509012: HasOnlyAsciiChars can return incorrect results. Fixup usages and rename. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fixed typo Created 7 years, 8 months 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
« include/v8.h ('K') | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 2c11f047dc2d8e2b58dc88425d117faf973108db..08378f195525fc4c3272f72356547dc360a3f823 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -355,14 +355,14 @@ bool String::IsTwoByteRepresentationUnderneath() {
}
-bool String::HasOnlyAsciiChars() {
+bool String::HasOnlyOneByteChars() {
uint32_t type = map()->instance_type();
- return (type & kAsciiDataHintMask) == kAsciiDataHintTag;
+ return (type & kOneByteDataHintMask) == kOneByteDataHintTag;
}
bool String::IsOneByteConvertible() {
- return HasOnlyAsciiChars() || IsOneByteRepresentation();
+ return HasOnlyOneByteChars() || IsOneByteRepresentation();
}
« include/v8.h ('K') | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698