未验证 提交 4b8dc4c2 编写于 作者: O openharmony_ci 提交者: Gitee

!687 fix anonymous stub translate problem by ipc

Merge pull request !687 from wanghaoxu/master
......@@ -284,9 +284,7 @@ bool IPCProcessSkeleton::AttachObject(IRemoteObject *object)
return false;
}
std::u16string descriptor = object->GetObjectDescriptor();
if (descriptor.empty()) {
return false;
}
auto current = ProcessSkeleton::GetInstance();
if (current == nullptr) {
ZLOGE(LOG_LABEL, "get process skeleton failed");
......
......@@ -101,6 +101,9 @@ bool ProcessSkeleton::AttachObject(IRemoteObject *object, const std::u16string &
std::unique_lock<std::shared_mutex> lockGuard(objMutex_);
(void)isContainStub_.insert(std::pair<IRemoteObject *, bool>(object, true));
if (descriptor.empty()) {
return false;
}
// If attemptIncStrong failed, old proxy might still exist, replace it with the new proxy.
wptr<IRemoteObject> wp = object;
auto result = objects_.insert_or_assign(descriptor, wp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册