Ignore:
Timestamp:
Jul 2, 2010, 4:49:07 PM (15 years ago)
Author:
[email protected]
Message:

2010-07-02 Sheriff Bot <[email protected]>

Unreviewed, rolling out r62410.
http://trac.webkit.org/changeset/62410
https://bugs.webkit.org/show_bug.cgi?id=41549

accursed last minute changes (Requested by olliej on #webkit).

  • parser/Lexer.cpp: (JSC::Lexer::setCode): (JSC::Lexer::copyCodeWithoutBOMs): (JSC::Lexer::sourceCode):
  • parser/SourceProvider.h: (JSC::): (JSC::SourceProvider::SourceProvider): (JSC::SourceProvider::hasBOMs): (JSC::UStringSourceProvider::create): (JSC::UStringSourceProvider::getRange): (JSC::UStringSourceProvider::UStringSourceProvider):
  • wtf/text/StringImpl.h:

2010-07-02 Sheriff Bot <[email protected]>

Unreviewed, rolling out r62410.
http://trac.webkit.org/changeset/62410
https://bugs.webkit.org/show_bug.cgi?id=41549

accursed last minute changes (Requested by olliej on #webkit).

  • bindings/js/ScriptSourceProvider.h: (WebCore::ScriptSourceProvider::ScriptSourceProvider):
  • 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

    r62410 r62416  
    3535namespace JSC {
    3636
     37    enum SourceBOMPresence { SourceHasNoBOMs, SourceCouldHaveBOMs };
     38
    3739    class SourceProvider : public RefCounted<SourceProvider> {
    3840    public:
    39         SourceProvider(const UString& url)
     41        SourceProvider(const UString& url, SourceBOMPresence hasBOMs = SourceCouldHaveBOMs)
    4042            : m_url(url)
     43            , m_hasBOMs(hasBOMs)
    4144        {
    4245        }
     
    5053        intptr_t asID() { return reinterpret_cast<intptr_t>(this); }
    5154
     55        SourceBOMPresence hasBOMs() const { return m_hasBOMs; }
     56
    5257    private:
    5358        UString m_url;
     59        SourceBOMPresence m_hasBOMs;
    5460    };
    5561
    5662    class UStringSourceProvider : public SourceProvider {
    5763    public:
    58         static PassRefPtr<UStringSourceProvider> create(const UString& source, const UString& url, bool hasBOMs = true)
     64        static PassRefPtr<UStringSourceProvider> create(const UString& source, const UString& url)
    5965        {
    60             return adoptRef(new UStringSourceProvider(source, url, hasBOMs));
     66            return adoptRef(new UStringSourceProvider(source, url));
    6167        }
    6268
    63         UString getRange(int start, int end) const
    64         {
    65             return m_source.substr(start, end - start);
    66         }
     69        UString getRange(int start, int end) const { return m_source.substr(start, end - start); }
    6770        const UChar* data() const { return m_source.data(); }
    6871        int length() const { return m_source.size(); }
    6972
    7073    private:
    71         UStringSourceProvider(const UString& source, const UString& url, bool hasBOMs)
     74        UStringSourceProvider(const UString& source, const UString& url)
    7275            : SourceProvider(url)
    7376            , m_source(source)
    7477        {
    75             if (hasBOMs && m_source.size()) {
    76                 bool scratch = false;
    77                 m_source = UString(m_source.rep()->copyStringWithoutBOMs(false, scratch));
    78             }
    7978        }
    8079
Note: See TracChangeset for help on using the changeset viewer.