Skip to content

Commit 7bbb484

Browse files
Alice WangGerrit Code Review
authored andcommitted
Merge "[RpcSession] Add checks before setting SessionSpecificRoot" into main
2 parents f53f1f7 + c0d5095 commit 7bbb484

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libs/binder/RpcSession.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,10 @@ bool RpcSession::setForServer(const wp<RpcServer>& server, const wp<EventListene
802802
}
803803

804804
void RpcSession::setSessionSpecificRoot(const sp<IBinder>& sessionSpecificRoot) {
805+
LOG_ALWAYS_FATAL_IF(mSessionSpecificRootObject != nullptr,
806+
"Session specific root object already set");
807+
LOG_ALWAYS_FATAL_IF(mForServer != nullptr,
808+
"Session specific root object cannot be set for a server");
805809
mSessionSpecificRootObject = sessionSpecificRoot;
806810
}
807811

0 commit comments

Comments
 (0)