!1227 在SendObituary时保证proxy可用性

Merge pull request !1227 from dengliang/master
This commit is contained in:
openharmony_ci 2024-07-20 13:30:18 +00:00 committed by Gitee
commit 76f79ece53
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -446,7 +446,12 @@ void BinderInvoker::OnBinderDied()
ProcessSkeleton::ConvertAddr(proxy), deadInfo.handle,
ProcessSkeleton::ConvertToSecureDesc(Str16ToStr8(deadInfo.desc)).c_str(), deadInfo.deadTime);
} else {
proxy->SendObituary();
if (proxy->AttemptIncStrongRef(this)) {
proxy->SendObituary();
proxy->DecStrongRef(this);
} else {
ZLOGW(LABEL, "failed to increment strong reference count");
}
}
}