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..add22dd3bcf2032e246fc1fdeb4f05e98386cc84 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(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. |
+ void WriteCompleted(scoped_refptr<IOBuffer> buf, |
Ryan Sleevi
2014/07/11 18:13:35
scoped-refptrs should always be const-ref
byungchul
2014/07/11 18:58:18
Done.
|
const CompletionCallback& callback, |
int rv) const; |
int HandleWriteCompleted(IOBuffer* buf, int rv) const; |