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

Unified Diff: content/renderer/pepper/pepper_websocket_host.cc

Issue 510663002: PepperWebSocketHost should not call blink::WebSocket APIs after closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: content/renderer/pepper/pepper_websocket_host.cc
diff --git a/content/renderer/pepper/pepper_websocket_host.cc b/content/renderer/pepper/pepper_websocket_host.cc
index 9b74ccc2dc5fab07429d63bfa5c346f7ee1158a7..6b55bb6975b99f1ca054ffe2934ea5b524f1df1c 100644
--- a/content/renderer/pepper/pepper_websocket_host.cc
+++ b/content/renderer/pepper/pepper_websocket_host.cc
@@ -194,8 +194,10 @@ void PepperWebSocketHost::didClose(unsigned long unhandled_buffered_amount,
}
// Disconnect.
- if (websocket_)
+ if (websocket_) {
websocket_->disconnect();
+ websocket_.reset();
+ }
}
int32_t PepperWebSocketHost::OnHostMsgConnect(

Powered by Google App Engine
This is Rietveld 408576698