Index: net/socket/tcp_socket_libevent.h |
diff --git a/net/socket/tcp_socket_libevent.h b/net/socket/tcp_socket_libevent.h |
index 59978aa3bb3969b256bc73cd41166566121e3da9..ba34aeebcd4bbcde9b15ac7104b6b863861ed049 100644 |
--- a/net/socket/tcp_socket_libevent.h |
+++ b/net/socket/tcp_socket_libevent.h |
@@ -148,12 +148,16 @@ class NET_EXPORT TCPSocketLibevent { |
void LogConnectBegin(const AddressList& addresses) const; |
void LogConnectEnd(int net_error) const; |
- void ReadCompleted(IOBuffer* buf, |
+ // Binds with scoped_refptr<IOBuffer> instead of IOBuffer* to make sure buf |
+ // alive when this callback is called. |
+ void ReadCompleted(const scoped_refptr<IOBuffer>& buf, |
const CompletionCallback& callback, |
int rv); |
int HandleReadCompleted(IOBuffer* buf, int rv); |
- void WriteCompleted(IOBuffer* buf, |
+ // Binds with scoped_refptr<IOBuffer> instead of IOBuffer* to make sure buf |
+ // alive when this callback is called. |
Ryan Sleevi
2014/07/11 19:04:43
I don't think either of these comments are needed/
byungchul
2014/07/11 21:35:52
Moved to .cc
|
+ void WriteCompleted(const scoped_refptr<IOBuffer>& buf, |
const CompletionCallback& callback, |
int rv) const; |
int HandleWriteCompleted(IOBuffer* buf, int rv) const; |