Revision: 5188
Author: [email protected]
Date: Thu Aug  5 11:12:39 2010
Log: Check ASCIIness of lhs, not this.

In one pathalogical case it's possible to have this->IsAsciiRepresentation() && !this->TryFlattenGetString()->IsAsciiRepresentation()---if cons string has two byte string which holds only ascii chars and second is an empty string. In this case we
would return first which is not AsciiRepresentation(), however cons is.

Review URL: http://codereview.chromium.org/3036046
http://code.google.com/p/v8/source/detail?r=5188

Modified:
 /branches/bleeding_edge/src/objects.cc

=======================================
--- /branches/bleeding_edge/src/objects.cc      Mon Aug  2 08:08:17 2010
+++ /branches/bleeding_edge/src/objects.cc      Thu Aug  5 11:12:39 2010
@@ -4738,7 +4738,7 @@
   }

   if (lhs->IsFlat()) {
-    if (IsAsciiRepresentation()) {
+    if (lhs->IsAsciiRepresentation()) {
       Vector<const char> vec1 = lhs->ToAsciiVector();
       if (rhs->IsFlat()) {
         if (rhs->IsAsciiRepresentation()) {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to