Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Unified Diff: Source/core/platform/network/chromium/SocketStreamHandle.cpp

Issue 14071008: WebSocket object should fire error event when WebSocket server can't be connected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Add new layouttests into TestExceptions because it depends on chromium side patch Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/network/chromium/SocketStreamHandle.cpp
diff --git a/Source/core/platform/network/chromium/SocketStreamHandle.cpp b/Source/core/platform/network/chromium/SocketStreamHandle.cpp
index 71c182dd914575698063d9502654529f424de2ae..fe99196cdfa58b26af545f57f9a99a3b6db5a3cb 100644
--- a/Source/core/platform/network/chromium/SocketStreamHandle.cpp
+++ b/Source/core/platform/network/chromium/SocketStreamHandle.cpp
@@ -34,9 +34,11 @@
#include "Logging.h"
#include "NotImplemented.h"
+#include "SocketStreamError.h"
#include "SocketStreamHandleClient.h"
#include <public/Platform.h>
#include <public/WebData.h>
+#include <public/WebSocketStreamError.h>
#include <public/WebSocketStreamHandle.h>
#include <wtf/PassOwnPtr.h>
@@ -153,11 +155,8 @@ void SocketStreamHandleInternal::didFail(WebKit::WebSocketStreamHandle* socketHa
LOG(Network, "SocketStreamHandleInternal %p didFail()", this);
if (m_handle && m_socket) {
ASSERT(socketHandle == m_socket.get());
- m_socket.clear();
- SocketStreamHandle* h = m_handle;
- m_handle = 0;
- if (h->m_client)
- h->m_client->didCloseSocketStream(h); // didFail(h, err);
+ if (m_handle->m_client)
+ m_handle->m_client->didFailSocketStream(m_handle, *(PassRefPtr<SocketStreamError>(err)));
}
}
« no previous file with comments | « Source/core/platform/network/chromium/SocketStreamError.h ('k') | Source/modules/websockets/MainThreadWebSocketChannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698