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

Unified Diff: chrome/browser/debugger/devtools_http_protocol_handler.cc

Issue 4188008: Use make_scoped_refptr for NewRunnableMethod if the raw ptr type is derivd from RefCountedThreadSafe (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: address comment Created 10 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 | chrome/browser/download/download_file_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/devtools_http_protocol_handler.cc
diff --git a/chrome/browser/debugger/devtools_http_protocol_handler.cc b/chrome/browser/debugger/devtools_http_protocol_handler.cc
index 5f01335252fbdd38df1566801fce7c8a16cffbc4..307aa84febd733358174a7d037e49d64c25f00d8 100644
--- a/chrome/browser/debugger/devtools_http_protocol_handler.cc
+++ b/chrome/browser/debugger/devtools_http_protocol_handler.cc
@@ -95,7 +95,7 @@ void DevToolsHttpProtocolHandler::OnHttpRequest(
FROM_HERE,
NewRunnableMethod(this,
&DevToolsHttpProtocolHandler::OnHttpRequestUI,
- socket,
+ make_scoped_refptr(socket),
info));
return;
}
@@ -123,7 +123,7 @@ void DevToolsHttpProtocolHandler::OnWebSocketRequest(
NewRunnableMethod(
this,
&DevToolsHttpProtocolHandler::OnWebSocketRequestUI,
- socket,
+ make_scoped_refptr(socket),
request));
}
@@ -135,7 +135,7 @@ void DevToolsHttpProtocolHandler::OnWebSocketMessage(HttpListenSocket* socket,
NewRunnableMethod(
this,
&DevToolsHttpProtocolHandler::OnWebSocketMessageUI,
- socket,
+ make_scoped_refptr(socket),
data));
}
@@ -154,6 +154,8 @@ void DevToolsHttpProtocolHandler::OnClose(HttpListenSocket* socket) {
socket_to_requests_io_.erase(socket);
}
+ // This can't use make_scoped_refptr because |socket| is already deleted
+ // when this runs -- http://crbug.com/59930
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
« no previous file with comments | « no previous file | chrome/browser/download/download_file_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698