Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (173897 => 173898)
--- branches/safari-600.1-branch/Source/WebCore/ChangeLog 2014-09-23 22:30:50 UTC (rev 173897)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog 2014-09-23 23:07:28 UTC (rev 173898)
@@ -1,5 +1,9 @@
2014-09-23 Lucas Forschler <lforsch...@apple.com>
+ Rollout trunk r173848 | (r173897 on branch)
+
+2014-09-23 Lucas Forschler <lforsch...@apple.com>
+
Merge r173848
2014-09-22 Alexey Proskuryakov <a...@apple.com>
Modified: branches/safari-600.1-branch/Source/WebCore/Modules/websockets/WebSocketChannel.cpp (173897 => 173898)
--- branches/safari-600.1-branch/Source/WebCore/Modules/websockets/WebSocketChannel.cpp 2014-09-23 22:30:50 UTC (rev 173897)
+++ branches/safari-600.1-branch/Source/WebCore/Modules/websockets/WebSocketChannel.cpp 2014-09-23 23:07:28 UTC (rev 173898)
@@ -85,13 +85,10 @@
{
if (Page* page = m_document->page())
m_identifier = page->progress().createUniqueIdentifier();
-
- LOG(Network, "WebSocketChannel %p ctor, identifier %lu", this, m_identifier);
}
WebSocketChannel::~WebSocketChannel()
{
- LOG(Network, "WebSocketChannel %p dtor", this);
}
void WebSocketChannel::connect(const URL& url, const String& protocol)
@@ -184,7 +181,6 @@
ASSERT(!m_suspended);
if (!m_handle)
return;
- Ref<WebSocketChannel> protect(*this); // An attempt to send closing handshake may fail, which will get the channel closed and dereferenced.
startClosingHandshake(code, reason);
if (m_closing && !m_closingTimer.isActive())
m_closingTimer.startOneShot(2 * TCPMaximumSegmentLifetime);
@@ -212,8 +208,6 @@
if (m_handle && !m_closed)
m_handle->disconnect(); // Will call didClose().
-
- ASSERT(m_closed);
}
void WebSocketChannel::disconnect()
@@ -464,7 +458,6 @@
void WebSocketChannel::startClosingHandshake(int code, const String& reason)
{
LOG(Network, "WebSocketChannel %p startClosingHandshake() code=%d m_receivedClosingHandshake=%d", this, m_closing, m_receivedClosingHandshake);
- ASSERT(!m_closed);
if (m_closing)
return;
ASSERT(m_handle);
@@ -478,14 +471,8 @@
buf.append(reason.utf8().data(), reason.utf8().length());
}
enqueueRawFrame(WebSocketFrame::OpCodeClose, buf.data(), buf.size());
- Ref<WebSocketChannel> protect(*this); // An attempt to send closing handshake may fail, which will get the channel closed and dereferenced.
processOutgoingFrameQueue();
- if (m_closed) {
- // The channel got closed because processOutgoingFrameQueue() failed.
- return;
- }
-
m_closing = true;
if (m_client)
m_client->didStartClosingHandshake();
@@ -719,8 +706,6 @@
if (m_outgoingFrameQueueStatus == OutgoingFrameQueueClosed)
return;
- Ref<WebSocketChannel> protect(*this); // Any call to fail() will get the channel closed and dereferenced.
-
while (!m_outgoingFrameQueue.isEmpty()) {
OwnPtr<QueuedFrame> frame = m_outgoingFrameQueue.takeFirst();
switch (frame->frameType) {