Ignore:
Timestamp:
Mar 19, 2012, 10:24:24 PM (13 years ago)
Author:
[email protected]
Message:

Do not copy the script source in the SourceProvider, just reference the existing string
https://bugs.webkit.org/show_bug.cgi?id=81466

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • parser/SourceCode.h: Remove the unused, and incorrect, function data().
  • parser/SourceProvider.h: Add OVERRIDE for clarity.

Source/WebCore:

Instead of creating a copy of the string with 16bits characters, we just return
a shared StringImpl.

  • bindings/js/CachedScriptSourceProvider.h:
  • bindings/js/StringSourceProvider.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/SourceCode.h

    r99618 r111358  
    7373        int startOffset() const { return m_startChar; }
    7474        int endOffset() const { return m_endChar; }
    75         const UChar* data() const
    76         {
    77             ASSERT(m_provider->data());
    78             return m_provider->data()->characters16() + m_startChar;
    79         }
    8075        int length() const { return m_endChar - m_startChar; }
    8176       
Note: See TracChangeset for help on using the changeset viewer.