| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
IDL编译整改添加安全编译选项 Signed-off-by: cuiruibin <cuiruibin3@h-partners.com> | 15 天前 | |
fix: replace DelayedSingleton with Meyer's singleton for StorageManagerConnect/CjStorageStatusService and clean up DelayedSingleton uses new(std::nothrow) which can return nullptr on OOM, causing crashes when callers dereference without checks. Meyer's singleton (static local reference) is C++11 thread-safe and never null. StorageManagerConnect: 44 arrow->dot replacements in kits_impl, 34 nullptr check blocks removed in taihe, SmDeathRecipient::OnRemoteDied fixed. CjStorageStatusService: 3 nullptr check blocks removed, CjSmDeathRecipient ::OnRemoteDied fixed. Move constructor and destructor to private for all three singleton classes to prevent external instantiation. Remove CreateForTesting/SetInstanceForTesting/GetInstanceForTesting/ ResetInstanceForTesting and instance_ptr_for_testing_ from StorageDaemonCommunication - testing utilities should not exist in business code. Update test files to use GetInstance() reference and ResetSdProxy(), following VolumeManagerService test pattern. Wrap over-120-char lines for cleancode compliance by extracting GetInstance() into local auto& reference. Co-Authored-By: Agent Signed-off-by: gzhuangzhuang <gengzhuangzhuang@huawei.com> Change-Id: I6954bebad07cf3cc0b2f5ee6066d1743eb87f755 | 7 天前 |