| Index: mojo/services/network/tcp_bound_socket_impl.cc
|
| diff --git a/mojo/services/network/tcp_bound_socket_impl.cc b/mojo/services/network/tcp_bound_socket_impl.cc
|
| index b7763045677124d6bd520b45467a5a47e23d51a1..5cf6828ac3ffea9916508eee5e7c64b627d9a71a 100644
|
| --- a/mojo/services/network/tcp_bound_socket_impl.cc
|
| +++ b/mojo/services/network/tcp_bound_socket_impl.cc
|
| @@ -12,7 +12,9 @@
|
|
|
| namespace mojo {
|
|
|
| -TCPBoundSocketImpl::TCPBoundSocketImpl() {
|
| +TCPBoundSocketImpl::TCPBoundSocketImpl(
|
| + scoped_ptr<mojo::AppRefCount> app_refcount)
|
| + : app_refcount_(app_refcount.Pass()) {
|
| }
|
|
|
| TCPBoundSocketImpl::~TCPBoundSocketImpl() {
|
| @@ -63,7 +65,9 @@ void TCPBoundSocketImpl::StartListening(
|
| }
|
|
|
| // The server socket object takes ownership of the socket.
|
| - BindToRequest(new TCPServerSocketImpl(socket_.Pass()), &server);
|
| + BindToRequest(
|
| + new TCPServerSocketImpl(socket_.Pass(), app_refcount_->Clone()),
|
| + &server);
|
| callback.Run(MakeNetworkError(net::OK));
|
| }
|
|
|
| @@ -106,7 +110,8 @@ void TCPBoundSocketImpl::OnConnected(int result) {
|
| if (result == net::OK) {
|
| new TCPConnectedSocketImpl(
|
| socket_.Pass(), pending_connect_send_stream_.Pass(),
|
| - pending_connect_receive_stream_.Pass(), pending_connect_socket_.Pass());
|
| + pending_connect_receive_stream_.Pass(), pending_connect_socket_.Pass(),
|
| + app_refcount_->Clone());
|
| } else {
|
| pending_connect_send_stream_.reset();
|
| pending_connect_receive_stream_.reset();
|
|
|