Changeset 109941 in webkit


Ignore:
Timestamp:
Mar 6, 2012 11:50:48 AM (12 years ago)
Author:
senorblanco@chromium.org
Message:

Unreviewed, rolling out r109840.
http://trac.webkit.org/changeset/109840
https://bugs.webkit.org/show_bug.cgi?id=80103

Broke WebSocket tests on Chrome Mac and Linux

Source/WebCore:

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::send):
(WebCore::WebSocket::close):

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::send):

LayoutTests:

  • http/tests/websocket/tests/hybi/close-expected.txt:
  • http/tests/websocket/tests/hybi/unpaired-surrogates-in-close-reason-expected.txt: Removed.
  • http/tests/websocket/tests/hybi/unpaired-surrogates-in-close-reason.html: Removed.
  • http/tests/websocket/tests/hybi/unpaired-surrogates-in-message-expected.txt: Removed.
  • http/tests/websocket/tests/hybi/unpaired-surrogates-in-message.html: Removed.
  • http/tests/websocket/tests/hybi/workers/close-expected.txt:
Location:
trunk
Files:
4 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r109938 r109941  
     12012-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
    1162012-03-06  Hans Wennborg  <hans@chromium.org>
    217
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/close-expected.txt

    r109840 r109941  
    11CONSOLE 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.
    42CONSOLE MESSAGE: WebSocket is closed before the connection is established.
    53Verify WebSocket::close behaviors.
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/workers/close-expected.txt

    r109840 r109941  
    11CONSOLE 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.
    42CONSOLE MESSAGE: WebSocket is closed before the connection is established.
    53Verify WebSocket::close behaviors in Worker.
  • trunk/Source/WebCore/ChangeLog

    r109939 r109941  
     12012-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
    1152012-03-05  Joseph Pecoraro  <pecoraro@apple.com>
    216
  • trunk/Source/WebCore/Modules/websockets/WebSocket.cpp

    r109840 r109941  
    289289        return false;
    290290    }
     291    // FIXME: check message is valid utf8.
    291292    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;
    299294}
    300295
     
    349344            return;
    350345        }
    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) {
    360348            ec = SYNTAX_ERR;
    361349            return;
  • trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp

    r109840 r109941  
    161161{
    162162    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();
    166164    if (m_useHixie76Protocol) {
    167165        return sendFrameHixie76(utf8.data(), utf8.length()) ? ThreadableWebSocketChannel::SendSuccess : ThreadableWebSocketChannel::SendFail;
Note: See TracChangeset for help on using the changeset viewer.