Skip to content

Commit 28cd13c

Browse files
committed
when app sends large message to their backend, network inspect agent sends the message to RWI which results in the busy loop blocking webkit main thread.Because it takes a while to read and transmit the message.
1 parent 8b1be3f commit 28cd13c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Source/WTF/wtf/glib/SocketConnection.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ bool SocketConnection::readMessage()
124124
memcpy(&flags, messageData, sizeof(MessageFlags));
125125
messageData += sizeof(MessageFlags);
126126
auto messageSize = sizeof(uint32_t) + sizeof(MessageFlags) + bodySize;
127-
if (m_readBuffer.size() < messageSize)
127+
if (m_readBuffer.size() < messageSize) {
128+
m_readBuffer.reserveCapacity(messageSize);
128129
return false;
130+
}
129131

130132
Checked<size_t> messageNameLength = strlen(messageData);
131133
messageNameLength++;

0 commit comments

Comments
 (0)