Title: [163325] trunk/Source/_javascript_Core
Revision
163325
Author
a...@apple.com
Date
2014-02-03 13:52:55 -0800 (Mon, 03 Feb 2014)

Log Message

Update JS whitespace definition for changes in Unicode 6.3
https://bugs.webkit.org/show_bug.cgi?id=127450

Reviewed by Oliver Hunt.

* parser/Lexer.h: (JSC::Lexer<UChar>::isWhiteSpace): Part 2 of the fix, update lexer too.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (163324 => 163325)


--- trunk/Source/_javascript_Core/ChangeLog	2014-02-03 21:51:47 UTC (rev 163324)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-02-03 21:52:55 UTC (rev 163325)
@@ -1,3 +1,12 @@
+2014-02-03  Alexey Proskuryakov  <a...@apple.com>
+
+        Update JS whitespace definition for changes in Unicode 6.3
+        https://bugs.webkit.org/show_bug.cgi?id=127450
+
+        Reviewed by Oliver Hunt.
+
+        * parser/Lexer.h: (JSC::Lexer<UChar>::isWhiteSpace): Part 2 of the fix, update lexer too.
+
 2014-02-03  Matthew Mirman  <mmir...@apple.com>
 
         Added GetTypedArrayByteOffset to FTL

Modified: trunk/Source/_javascript_Core/parser/Lexer.h (163324 => 163325)


--- trunk/Source/_javascript_Core/parser/Lexer.h	2014-02-03 21:51:47 UTC (rev 163324)
+++ trunk/Source/_javascript_Core/parser/Lexer.h	2014-02-03 21:52:55 UTC (rev 163325)
@@ -248,7 +248,8 @@
 template <>
 ALWAYS_INLINE bool Lexer<UChar>::isWhiteSpace(UChar ch)
 {
-    return (ch < 256) ? Lexer<LChar>::isWhiteSpace(static_cast<LChar>(ch)) : (u_charType(ch) == U_SPACE_SEPARATOR || ch == 0xFEFF);
+    // 0x180E used to be in Zs category before Unicode 6.3, and EcmaScript says that we should keep treating it as such.
+    return (ch < 256) ? Lexer<LChar>::isWhiteSpace(static_cast<LChar>(ch)) : (u_charType(ch) == U_SPACE_SEPARATOR || ch == 0x180E || ch == 0xFEFF);
 }
 
 template <>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to