Changeset 88610 in webkit


Ignore:
Timestamp:
Jun 11, 2011 9:19:39 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-06-11 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

Remove unnecessary strlen from DocumentWriter
https://bugs.webkit.org/show_bug.cgi?id=62505

This ugly piece of code appears not to be needed. Rejoice.

  • WebCore.exp.in:
  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData):
  • loader/DocumentLoader.h:
  • loader/DocumentWriter.cpp: (WebCore::DocumentWriter::addData):
  • loader/DocumentWriter.h:
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88609 r88610  
     12011-06-11  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Remove unnecessary strlen from DocumentWriter
     6        https://bugs.webkit.org/show_bug.cgi?id=62505
     7
     8        This ugly piece of code appears not to be needed.  Rejoice.
     9
     10        * WebCore.exp.in:
     11        * loader/DocumentLoader.cpp:
     12        (WebCore::DocumentLoader::commitData):
     13        * loader/DocumentLoader.h:
     14        * loader/DocumentWriter.cpp:
     15        (WebCore::DocumentWriter::addData):
     16        * loader/DocumentWriter.h:
     17
    1182011-06-11  Adam Barth  <abarth@webkit.org>
    219
  • trunk/Source/WebCore/WebCore.exp.in

    r88260 r88610  
    333333__ZN7WebCore14CachedResource16unregisterHandleEPNS_24CachedResourceHandleBaseE
    334334__ZN7WebCore14CachedResource9addClientEPNS_20CachedResourceClientE
    335 __ZN7WebCore14DocumentLoader10commitDataEPKci
     335__ZN7WebCore14DocumentLoader10commitDataEPKcm
    336336__ZN7WebCore14DocumentLoader13attachToFrameEv
    337337__ZN7WebCore14DocumentLoader15detachFromFrameEv
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r87189 r88610  
    308308}
    309309
    310 void DocumentLoader::commitData(const char* bytes, int length)
     310void DocumentLoader::commitData(const char* bytes, size_t length)
    311311{
    312312    // Set the text encoding.  This is safe to call multiple times.
  • trunk/Source/WebCore/loader/DocumentLoader.h

    r87990 r88610  
    239239        // The WebKit layer calls this function when it's ready for the data to
    240240        // actually be added to the document.
    241         void commitData(const char* bytes, int length);
     241        void commitData(const char* bytes, size_t length);
    242242
    243243#if ENABLE(OFFLINE_WEB_APPLICATIONS)
  • trunk/Source/WebCore/loader/DocumentWriter.cpp

    r88609 r88610  
    199199}
    200200
    201 void DocumentWriter::addData(const char* bytes, int length)
    202 {
    203     if (length == -1)
    204         length = strlen(bytes);
    205 
     201void DocumentWriter::addData(const char* bytes, size_t length)
     202{
    206203    m_parser->appendBytes(this, bytes, length);
    207204}
  • trunk/Source/WebCore/loader/DocumentWriter.h

    r88609 r88610  
    5252    void begin();
    5353    void begin(const KURL&, bool dispatchWindowObjectAvailable = true, SecurityOrigin* forcedSecurityOrigin = 0);
    54     void addData(const char* bytes, int length = -1);
     54    void addData(const char* bytes, size_t length);
    5555    void end();
    5656    void endIfNotLoadingMainResource();
Note: See TracChangeset for help on using the changeset viewer.