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. |