Ignore:
Timestamp:
Jul 13, 2010, 6:02:12 PM (15 years ago)
Author:
[email protected]
Message:

2010-07-13 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

ES5 requires BOMs to be treated as whitespace
https://bugs.webkit.org/show_bug.cgi?id=42218

Add BOM character to the Lexer's definition of whitespace,
and remove the logic that dealt with stripping BOMs and
caching the cleaned string.

  • parser/Lexer.h: (JSC::Lexer::isWhiteSpace):
  • parser/SourceProvider.h: (JSC::UStringSourceProvider::create): (JSC::UStringSourceProvider::UStringSourceProvider):
  • wtf/text/StringImpl.h:

2010-07-13 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

ES5 requires BOMs to be treated as whitespace
https://bugs.webkit.org/show_bug.cgi?id=42218

Update the fast/js/removing-Cf-characters to reflect
new behaviour. Update a whole group of sputnik results
that we now pass.

  • fast/js/removing-Cf-characters-expected.txt:
  • fast/js/script-tests/removing-Cf-characters.js:
  • fast/js/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.1_T2-expected.txt:
  • fast/js/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.4_T2-expected.txt:
  • fast/js/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.1_T2-expected.txt:
  • fast/js/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.4_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_218/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_218/S7.1_A2.2_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_320/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_320/S7.1_A2.2_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_410/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_410/S7.1_A2.2_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_500/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_500/S7.1_A2.2_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_510/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_510/S7.1_A2.2_T2-expected.txt:

2010-07-13 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

ES5 requires BOMs to be treated as whitespace
https://bugs.webkit.org/show_bug.cgi?id=42218

Remove BOM handling logic from WebCore Script objects.

  • bindings/js/StringSourceProvider.h: (WebCore::StringSourceProvider::StringSourceProvider):
  • loader/CachedScript.cpp: (WebCore::CachedScript::CachedScript): (WebCore::CachedScript::script):
  • loader/CachedScript.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/SourceProvider.h

    r62848 r63273  
    6161    class UStringSourceProvider : public SourceProvider {
    6262    public:
    63         static PassRefPtr<UStringSourceProvider> create(const UString& source, const UString& url, bool hasBOMs = true)
     63        static PassRefPtr<UStringSourceProvider> create(const UString& source, const UString& url)
    6464        {
    65             return adoptRef(new UStringSourceProvider(source, url, hasBOMs));
     65            return adoptRef(new UStringSourceProvider(source, url));
    6666        }
    6767
     
    7474
    7575    private:
    76         UStringSourceProvider(const UString& source, const UString& url, bool hasBOMs)
     76        UStringSourceProvider(const UString& source, const UString& url)
    7777            : SourceProvider(url)
    7878            , m_source(source)
    7979        {
    80             if (hasBOMs && m_source.size()) {
    81                 bool scratch = false;
    82                 m_source = UString(m_source.rep()->copyStringWithoutBOMs(false, scratch));
    83             }
    8480        }
    8581
Note: See TracChangeset for help on using the changeset viewer.