Commit 300580d5 authored by antonm@chromium.org's avatar antonm@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1844e149
...@@ -4738,7 +4738,7 @@ bool String::SlowEquals(String* other) { ...@@ -4738,7 +4738,7 @@ bool String::SlowEquals(String* other) {
} }
if (lhs->IsFlat()) { if (lhs->IsFlat()) {
if (IsAsciiRepresentation()) { if (lhs->IsAsciiRepresentation()) {
Vector<const char> vec1 = lhs->ToAsciiVector(); Vector<const char> vec1 = lhs->ToAsciiVector();
if (rhs->IsFlat()) { if (rhs->IsFlat()) {
if (rhs->IsAsciiRepresentation()) { if (rhs->IsAsciiRepresentation()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment