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

Unified Diff: content/renderer/websockethandle_impl.cc

Issue 2258003003: [WebSocket] Ignore connection errors in the shutdown sequence (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/websockethandle_impl.cc
diff --git a/content/renderer/websockethandle_impl.cc b/content/renderer/websockethandle_impl.cc
index 5191be933de9ca7ef7fc3785762854b6c487ec2c..92e8b5fad44eedbd95f96e1804db507ab4d351ed 100644
--- a/content/renderer/websockethandle_impl.cc
+++ b/content/renderer/websockethandle_impl.cc
@@ -159,6 +159,15 @@ void WebSocketHandleImpl::Disconnect() {
}
void WebSocketHandleImpl::OnConnectionError() {
+ if (!blink::Platform::current()) {
darin (slow to review) 2016/08/19 15:54:16 This seems like a sensible band-aid.
+ // In the renderrer shutdown sequence, mojo channels are destructed and this
+ // function is called. On the other hand, blink objects became invalid
+ // *silently*, which means we must not touch |*client_| any more.
+ // TODO(yhirano): Remove this code once the shutdown sequence is fixed.
+ Disconnect();
+ return;
+ }
+
// Our connection to the WebSocket was dropped. This could be due to
// exceeding the maximum number of concurrent websockets from this process.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698