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

Unified Diff: content/browser/devtools/protocol/tethering_handler.cc

Issue 2390883003: Fix crash in Android DevTools port forwarding handler. (Closed)
Patch Set: Addressed feedback. Created 4 years, 2 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/browser/devtools/protocol/tethering_handler.cc
diff --git a/content/browser/devtools/protocol/tethering_handler.cc b/content/browser/devtools/protocol/tethering_handler.cc
index 3f9b8ad60c28796381049c1002d9f21b209e4af1..2f3f4a132c03caaee7e3db7b9bef9a9044adb3a8 100644
--- a/content/browser/devtools/protocol/tethering_handler.cc
+++ b/content/browser/devtools/protocol/tethering_handler.cc
@@ -40,8 +40,10 @@ class SocketPump {
std::string Init(const CreateServerSocketCallback& socket_callback) {
std::string channel_name;
server_socket_ = socket_callback.Run(&channel_name);
- if (!server_socket_.get() || channel_name.empty())
+ if (!server_socket_.get() || channel_name.empty()) {
SelfDestruct();
+ return std::string();
+ }
int result = server_socket_->Accept(
&accepted_socket_,
« 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