Title: [87876] trunk/Source/WebCore
- Revision
- 87876
- Author
- [email protected]
- Date
- 2011-06-01 19:53:13 -0700 (Wed, 01 Jun 2011)
Log Message
2011-06-01 Yuta Kitamura <[email protected]>
Reviewed by Kent Tamura.
WebSocket: WebSocketChannel::fail() should close the connection immediately
https://bugs.webkit.org/show_bug.cgi?id=61851
The effect of this change is almost unobservable. The difference between m_handle->close() and
m_handle->disconnect() is that the former does not close the connection if the handle has
unsent data while the latter immediately closes the connection regardless of unsent data.
Usually a socket stream handle does not have unsent data, and even if it has any, it is hard
for user scripts to observe the difference between close() and disconnect() (it should take some time
for onclose() to be called if there are any unsent data, but there ought to be no other difference
in user scripts' perspective).
No new tests are added, because writing a test for this issue is not feasible due to the above reason.
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::fail): Use m_handle->disconnect() instead of m_handle->close().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (87875 => 87876)
--- trunk/Source/WebCore/ChangeLog 2011-06-02 02:49:37 UTC (rev 87875)
+++ trunk/Source/WebCore/ChangeLog 2011-06-02 02:53:13 UTC (rev 87876)
@@ -1,3 +1,23 @@
+2011-06-01 Yuta Kitamura <[email protected]>
+
+ Reviewed by Kent Tamura.
+
+ WebSocket: WebSocketChannel::fail() should close the connection immediately
+ https://bugs.webkit.org/show_bug.cgi?id=61851
+
+ The effect of this change is almost unobservable. The difference between m_handle->close() and
+ m_handle->disconnect() is that the former does not close the connection if the handle has
+ unsent data while the latter immediately closes the connection regardless of unsent data.
+ Usually a socket stream handle does not have unsent data, and even if it has any, it is hard
+ for user scripts to observe the difference between close() and disconnect() (it should take some time
+ for onclose() to be called if there are any unsent data, but there ought to be no other difference
+ in user scripts' perspective).
+
+ No new tests are added, because writing a test for this issue is not feasible due to the above reason.
+
+ * websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::fail): Use m_handle->disconnect() instead of m_handle->close().
+
2011-06-01 Abhishek Arya <[email protected]>
Unreviewed.
Modified: trunk/Source/WebCore/websockets/WebSocketChannel.cpp (87875 => 87876)
--- trunk/Source/WebCore/websockets/WebSocketChannel.cpp 2011-06-02 02:49:37 UTC (rev 87875)
+++ trunk/Source/WebCore/websockets/WebSocketChannel.cpp 2011-06-02 02:53:13 UTC (rev 87876)
@@ -136,7 +136,7 @@
if (m_context)
m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, reason, 0, m_handshake.clientOrigin(), 0);
if (m_handle && !m_closed)
- m_handle->close(); // Will call didClose().
+ m_handle->disconnect(); // Will call didClose().
}
void WebSocketChannel::disconnect()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes