Changeset 163325 in webkit


Ignore:
Timestamp:
Feb 3, 2014 1:52:55 PM (10 years ago)
Author:
ap@apple.com
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.
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r163324 r163325  
     12014-02-03  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Update JS whitespace definition for changes in Unicode 6.3
     4        https://bugs.webkit.org/show_bug.cgi?id=127450
     5
     6        Reviewed by Oliver Hunt.
     7
     8        * parser/Lexer.h: (JSC::Lexer<UChar>::isWhiteSpace): Part 2 of the fix, update lexer too.
     9
    1102014-02-03  Matthew Mirman  <mmirman@apple.com>
    211
  • trunk/Source/JavaScriptCore/parser/Lexer.h

    r163310 r163325  
    249249ALWAYS_INLINE bool Lexer<UChar>::isWhiteSpace(UChar ch)
    250250{
    251     return (ch < 256) ? Lexer<LChar>::isWhiteSpace(static_cast<LChar>(ch)) : (u_charType(ch) == U_SPACE_SEPARATOR || ch == 0xFEFF);
     251    // 0x180E used to be in Zs category before Unicode 6.3, and EcmaScript says that we should keep treating it as such.
     252    return (ch < 256) ? Lexer<LChar>::isWhiteSpace(static_cast<LChar>(ch)) : (u_charType(ch) == U_SPACE_SEPARATOR || ch == 0x180E || ch == 0xFEFF);
    252253}
    253254
Note: See TracChangeset for help on using the changeset viewer.