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

Unified Diff: net/socket/tcp_server_socket_libevent.cc

Issue 9837122: Reset accept_callback_ before calling it from TCPServerSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | net/socket/tcp_server_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_server_socket_libevent.cc
diff --git a/net/socket/tcp_server_socket_libevent.cc b/net/socket/tcp_server_socket_libevent.cc
index e793dd65749d2726146d2d31685c7a4fe023b94c..904256a794953a9a13f29690636863cd717ff448 100644
--- a/net/socket/tcp_server_socket_libevent.cc
+++ b/net/socket/tcp_server_socket_libevent.cc
@@ -187,8 +187,9 @@ void TCPServerSocketLibevent::OnFileCanReadWithoutBlocking(int fd) {
accept_socket_ = NULL;
bool ok = accept_socket_watcher_.StopWatchingFileDescriptor();
DCHECK(ok);
- accept_callback_.Run(result);
+ CompletionCallback callback = accept_callback_;
James Hawkins 2012/03/28 23:25:22 accept_callback_.Reset().Run(result);
Sergey Ulanov 2012/03/29 00:05:38 I don't think Callback<>.Reset() returns anything,
James Hawkins 2012/03/30 20:25:01 Huh. I could swear someone just added this recent
accept_callback_.Reset();
+ callback.Run(result);
}
}
« no previous file with comments | « no previous file | net/socket/tcp_server_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698