summaryrefslogtreecommitdiff
path: root/libs/binder/RpcServer.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-04-12 21:09:03 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-04-12 21:09:03 +0000
commitd5cc17b3b45f32f1a74d963b2c59e39a12c46675 (patch)
treeb9331e64756e73b847d0996f1c4ab8c28c767e39 /libs/binder/RpcServer.cpp
parent369abe010a738a5c5e841cfeac82bd0fca7bfb1c (diff)
parent1a3a8effca802995ece193b7d40cd80abba55798 (diff)
Merge "libbinder use stronger refbase semantics"
Diffstat (limited to 'libs/binder/RpcServer.cpp')
-rw-r--r--libs/binder/RpcServer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp
index df07916f7a..1fa37bacb3 100644
--- a/libs/binder/RpcServer.cpp
+++ b/libs/binder/RpcServer.cpp
@@ -36,7 +36,7 @@ RpcServer::RpcServer() {}
RpcServer::~RpcServer() {}
sp<RpcServer> RpcServer::make() {
- return new RpcServer;
+ return sp<RpcServer>::make();
}
void RpcServer::iUnderstandThisCodeIsExperimentalAndIWillNotUseItInProduction() {
@@ -47,7 +47,7 @@ sp<RpcConnection> RpcServer::addClientConnection() {
LOG_ALWAYS_FATAL_IF(!mAgreedExperimental, "no!");
auto connection = RpcConnection::make();
- connection->setForServer(this);
+ connection->setForServer(sp<RpcServer>::fromExisting(this));
mConnections.push_back(connection);
return connection;
}