Changeset 109941 in webkit
- Timestamp:
- Mar 6, 2012 11:50:48 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109938 r109941 1 2012-03-06 Stephen White <senorblanco@chromium.org> 2 3 Unreviewed, rolling out r109840. 4 http://trac.webkit.org/changeset/109840 5 https://bugs.webkit.org/show_bug.cgi?id=80103 6 7 Broke WebSocket tests on Chrome Mac and Linux 8 9 * http/tests/websocket/tests/hybi/close-expected.txt: 10 * http/tests/websocket/tests/hybi/unpaired-surrogates-in-close-reason-expected.txt: Removed. 11 * http/tests/websocket/tests/hybi/unpaired-surrogates-in-close-reason.html: Removed. 12 * http/tests/websocket/tests/hybi/unpaired-surrogates-in-message-expected.txt: Removed. 13 * http/tests/websocket/tests/hybi/unpaired-surrogates-in-message.html: Removed. 14 * http/tests/websocket/tests/hybi/workers/close-expected.txt: 15 1 16 2012-03-06 Hans Wennborg <hans@chromium.org> 2 17 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/close-expected.txt
r109840 r109941 1 1 CONSOLE MESSAGE: WebSocket is closed before the connection is established. 2 CONSOLE MESSAGE: WebSocket close message is too long.3 CONSOLE MESSAGE: WebSocket close message is too long.4 2 CONSOLE MESSAGE: WebSocket is closed before the connection is established. 5 3 Verify WebSocket::close behaviors. -
trunk/LayoutTests/http/tests/websocket/tests/hybi/workers/close-expected.txt
r109840 r109941 1 1 CONSOLE MESSAGE: WebSocket is closed before the connection is established. 2 CONSOLE MESSAGE: WebSocket close message is too long.3 CONSOLE MESSAGE: WebSocket close message is too long.4 2 CONSOLE MESSAGE: WebSocket is closed before the connection is established. 5 3 Verify WebSocket::close behaviors in Worker. -
trunk/Source/WebCore/ChangeLog
r109939 r109941 1 2012-03-06 Stephen White <senorblanco@chromium.org> 2 3 Unreviewed, rolling out r109840. 4 http://trac.webkit.org/changeset/109840 5 https://bugs.webkit.org/show_bug.cgi?id=80103 6 7 Broke WebSocket tests on Chrome Mac and Linux 8 9 * Modules/websockets/WebSocket.cpp: 10 (WebCore::WebSocket::send): 11 (WebCore::WebSocket::close): 12 * Modules/websockets/WebSocketChannel.cpp: 13 (WebCore::WebSocketChannel::send): 14 1 15 2012-03-05 Joseph Pecoraro <pecoraro@apple.com> 2 16 -
trunk/Source/WebCore/Modules/websockets/WebSocket.cpp
r109840 r109941 289 289 return false; 290 290 } 291 // FIXME: check message is valid utf8. 291 292 ASSERT(m_channel); 292 ThreadableWebSocketChannel::SendResult result = m_channel->send(message); 293 if (result == ThreadableWebSocketChannel::InvalidMessage) { 294 scriptExecutionContext()->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Websocket message contains invalid character(s)."); 295 ec = SYNTAX_ERR; 296 return false; 297 } 298 return result == ThreadableWebSocketChannel::SendSuccess; 293 return m_channel->send(message) == ThreadableWebSocketChannel::SendSuccess; 299 294 } 300 295 … … 349 344 return; 350 345 } 351 CString utf8 = reason.utf8(true); 352 if (utf8.length() > maxReasonSizeInBytes) { 353 scriptExecutionContext()->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "WebSocket close message is too long."); 354 ec = SYNTAX_ERR; 355 return; 356 } 357 // Checks whether reason is valid utf8. 358 if (utf8.isNull() && reason.length()) { 359 scriptExecutionContext()->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "WebSocket close message contains invalid character(s)."); 346 // FIXME: if reason contains any unpaired surrogates, raise SYNTAX_ERR. 347 if (reason.utf8().length() > maxReasonSizeInBytes) { 360 348 ec = SYNTAX_ERR; 361 349 return; -
trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp
r109840 r109941 161 161 { 162 162 LOG(Network, "WebSocketChannel %p send %s", this, message.utf8().data()); 163 CString utf8 = message.utf8(true); 164 if (utf8.isNull() && message.length()) 165 return InvalidMessage; 163 CString utf8 = message.utf8(); 166 164 if (m_useHixie76Protocol) { 167 165 return sendFrameHixie76(utf8.data(), utf8.length()) ? ThreadableWebSocketChannel::SendSuccess : ThreadableWebSocketChannel::SendFail;
Note: See TracChangeset
for help on using the changeset viewer.