Skip to content

Commit c0d5095

Browse files
author
Alice Wang
committed
[RpcSession] Add checks before setting SessionSpecificRoot
for the IAccessor flow. Bug: 338541373 Test: atest vm_accessor_test Change-Id: I59a2847040857805a1e6c12027271deaf509fd09
1 parent 8578f13 commit c0d5095

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)