Index: mojo/services/network/network_service_impl.cc |
diff --git a/mojo/services/network/network_service_impl.cc b/mojo/services/network/network_service_impl.cc |
index 64eb3370f89054627ec2cd3bd732dd7c84345958..ed4db49930c1425e4775b12c00f84958ff9bd866 100644 |
--- a/mojo/services/network/network_service_impl.cc |
+++ b/mojo/services/network/network_service_impl.cc |
@@ -66,8 +66,9 @@ void NetworkServiceImpl::CreateTCPConnectedSocket( |
callback.Run(MakeNetworkError(net::ERR_NOT_IMPLEMENTED), NetAddressPtr()); |
} |
-void NetworkServiceImpl::CreateUDPSocket(InterfaceRequest<UDPSocket> socket) { |
- BindToRequest(new UDPSocketImpl(), &socket); |
+void NetworkServiceImpl::CreateUDPSocket(InterfaceRequest<UDPSocket> request) { |
+ // The lifetime of this UDPSocketImpl is bound to that of the underlying pipe. |
+ new UDPSocketImpl(request.Pass()); |
} |
} // namespace mojo |