fix crash on JS that ends with an identifier
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Feb 2007 07:37:45 +0000 (07:37 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Feb 2007 07:37:45 +0000 (07:37 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19393 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h

index c65f57c49d834872d8a268d3e7a8b4bded4681a2..48d10fb26ab6e39a7d4e4f906ebbc6703fc9d07a 100644 (file)
@@ -1,3 +1,13 @@
+2007-02-03  George Staikos  <staikos@kde.org>
+
+        Reviewed by Alexey.
+
+        -1 is not a valid point.  We can't handle anything > 0xffff anyway.
+        Fixes crash on cases like eval("x");
+
+        * wtf/unicode/qt4/UnicodeQt4.h:
+        (WTF::Unicode::category):
+
 2007-02-02  Darin Adler  <darin@apple.com>
 
         Reviewed by Anders.
index 7d762140a910479aa47552f2ba10b80058a52dc7..bb98875ccb1c8955e606461741bf33d9cdbd0bf1 100644 (file)
@@ -470,7 +470,7 @@ namespace WTF {
     inline CharCategory category(UChar32 c)
     {
       if (c > 0xffff)
-        return (CharCategory) U_MASK(QChar::Letter_Other);
+        return NoCategory;
       return (CharCategory) U_MASK(QChar(c).category());
     }