Changeset 146965 in webkit


Ignore:
Timestamp:
Mar 26, 2013 10:03:11 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Make SocketStreamHandle (Chromium port) fully use IPC window in send()
https://bugs.webkit.org/show_bug.cgi?id=113304

Patch by Takeshi Yoshino <tyoshino@chromium.org> on 2013-03-26
Reviewed by Kent Tamura.

socket_stream of Chromium buffers send data up to 32KiB (exact) bytes.

However, SocketStreamHandleInternal::send() method now keeps in-flight
send data not greater than m_maxPendingSendAllowed - 1 that is
32KiB - 1. This means that SocketStreamHandleInternal consumes the
buffered data in SocketStreamHandleBase by 32KiB - 1. It makes memory
copy operations unaligned unnecessarily. It should just use the
allowed size fully.

  • platform/network/chromium/SocketStreamHandle.cpp:

(WebCore::SocketStreamHandleInternal::send):
(WebCore):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r146961 r146965  
     12013-03-26  Takeshi Yoshino  <tyoshino@chromium.org>
     2
     3        Make SocketStreamHandle (Chromium port) fully use IPC window in send()
     4        https://bugs.webkit.org/show_bug.cgi?id=113304
     5
     6        Reviewed by Kent Tamura.
     7
     8        socket_stream of Chromium buffers send data up to 32KiB (exact) bytes.
     9
     10        However, SocketStreamHandleInternal::send() method now keeps in-flight
     11        send data not greater than m_maxPendingSendAllowed - 1 that is
     12        32KiB - 1. This means that SocketStreamHandleInternal consumes the
     13        buffered data in SocketStreamHandleBase by 32KiB - 1. It makes memory
     14        copy operations unaligned unnecessarily. It should just use the
     15        allowed size fully.
     16
     17        * platform/network/chromium/SocketStreamHandle.cpp:
     18        (WebCore::SocketStreamHandleInternal::send):
     19        (WebCore):
     20
    1212013-03-26  Hayato Ito  <hayato@chromium.org>
    222
  • trunk/Source/WebCore/platform/network/chromium/SocketStreamHandle.cpp

    r139774 r146965  
    7878        return 0;
    7979    }
    80     if (m_pendingAmountSent + len >= m_maxPendingSendAllowed)
    81         len = m_maxPendingSendAllowed - m_pendingAmountSent - 1;
     80    if (m_pendingAmountSent + len > m_maxPendingSendAllowed)
     81        len = m_maxPendingSendAllowed - m_pendingAmountSent;
    8282
    8383    if (len <= 0)
     
    9999        m_socket->close();
    100100}
    101    
     101
    102102void SocketStreamHandleInternal::didOpenStream(WebKit::WebSocketStreamHandle* socketHandle, int maxPendingSendAllowed)
    103103{
Note: See TracChangeset for help on using the changeset viewer.