Commit bfc97c9f authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 65e29c9d
2013-03-26 Takeshi Yoshino <tyoshino@chromium.org>
Make SocketStreamHandle (Chromium port) fully use IPC window in send()
https://bugs.webkit.org/show_bug.cgi?id=113304
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):
2013-03-26 Hayato Ito <hayato@chromium.org>
 
Allow ShadowContents in HitTests by default.
......@@ -77,8 +77,8 @@ int SocketStreamHandleInternal::send(const char* data, int len)
LOG(Network, "m_socket is null when sending. It should not be.");
return 0;
}
if (m_pendingAmountSent + len >= m_maxPendingSendAllowed)
len = m_maxPendingSendAllowed - m_pendingAmountSent - 1;
if (m_pendingAmountSent + len > m_maxPendingSendAllowed)
len = m_maxPendingSendAllowed - m_pendingAmountSent;
if (len <= 0)
return len;
......@@ -98,7 +98,7 @@ void SocketStreamHandleInternal::close()
if (m_socket)
m_socket->close();
}
void SocketStreamHandleInternal::didOpenStream(WebKit::WebSocketStreamHandle* socketHandle, int maxPendingSendAllowed)
{
LOG(Network, "SocketStreamHandleInternal::didOpen %d",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment