LGTM. Should we have a test case for this? On Tue, Oct 7, 2008 at 5:33 PM, <[EMAIL PROTECTED]> wrote: > Reviewers: Kasper Lund, > > Description: > Fix incorrect short cut test that assumed ASCII strings could be Latin1. > > Please review this at http://codereview.chromium.org/6542 > > Affected files: > M src/runtime.cc > > > Index: src/runtime.cc > =================================================================== > --- src/runtime.cc (revision 465) > +++ src/runtime.cc (working copy) > @@ -1086,7 +1086,11 @@ > // Notice: Doesn't include last character. > for (int i = p < m ? m - p : 0; i < m - 1; i++) { > uc32 c = pattern[i]; > - if (sizeof(schar) == 1 && c > 255) return -1; > + if (sizeof(schar) == 1 && > + sizeof(pchar) > 1 && > + c > String::kMaxAsciiCharCode) { > + return -1; > + } > bad_char_map[c & kBMHSignificantBitsMask] = m - 1 - i; > } > > > >
--~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
