| Files | Last commit | Last update |
|---|---|---|
!2722 merge fix/util-console-cleanup-20261113 into master 调整 Util 异常抛出方式、回退 ConsoleTest050–089 并清理部件依赖 Created-by: Malzahar Commit-by: 王子睿 Merged-by: openharmony_ci Description: ## 一:关联的Issue https://gitcode.com/openharmony/commonlibrary_ets_utils/issues/2552 ## 二:修改原因 (目的、解决的问题等,例如:修复xx场景崩溃问题) 统一 Util 中剩余 6 处参数错误的异常抛出方式,回退指定范围的 Console 单测,并清理部件依赖和同步 Util 注册调整。 ## 三:修改描述 (做了什么,变更了什么,例如:xx函数入口增加判空) 1. 将 SetTrackGlobalRef、GetThresholdProperty、OnVMHeapMemoryPressure 中 6 处 ErrorHelper::ThrowError(env, TYPE_ERROR_CODE, ...) 改为本地 ThrowError(env, message),保留原有错误文案及返回路径。 2. 回退 ConsoleTest050~089 共 40 个用例、1046 行,保留 ConsoleTest049 及之前内容。 3. 从 bundle.json 删除 typescript 和 ace_engine 部件依赖。 4. 清理 Util 的头文件/命名空间引用,调整 EnableLocalHandleDetection 的位置和注册顺序,增加 hintGC 注册并在 StringDecoderInit 后实现 HintGC:支持可选 urgencyLevel,默认 LOW,校验 0/1/2 后调用当前 VM 的 JSNApi::HintGC,返回 undefined。 本 PR 只有一个提交,涉及 3 个文件,53 行新增、1073 行删除。 ## 四:兼容性领域分析 (若涉及非兼容性变更,需简要说明**变更点**,否则请简要说明不涉及的**理由**) 未修改已有公共 API 的参数和返回值签名。上述 6 处异常改为本地 ThrowError 后采用 BusinessError、数字错误码 401;异常 code/name 的行为兼容性仍需结合运行时与相关用例验证。hintGC 注册需要验证运行时接口及 SDK 声明一致性;删除部件依赖需在完整构建环境检查依赖闭包。 ## 五:CheckList(**必填项**) ### 1. 接口功能自检 - rk3568 推UT文件执行(影响功能的必须执行) - [x] 已通过 - [ ] 不涉及,无需验证 - xts测试套执行(影响功能的必须执行) - [x] 已通过 - [ ] 不涉及,无需验证 ### 2. 解决问题分类自检 (基于问题维度自检) - [ ] 解决接口发生crash等问题。 - [ ] 解决接口定义与实际表现不一致问题。 - [x] 解决接口历史方案存在的问题。 - [ ] 解决接口性能问题。 - [ ] 新需求上库。 - [ ] 解决告警问题。 - [ ] 不涉及 ### 3. 接口功能用例看护自检(基于修改的功能点自检) - [ ] 接口功能有看护用例,测试已通过。 - [ ] 接口功能没有用例看护,已经补充用例。 - [ ] 接口功能的看护用例存在问题,同步修改用例。 - [ ] 涉及接口变更行为,看护用例需同步修改。 - [x] 不涉及 ### 4. 稳定性专项自检(非Test代码必须执行) - 用例验证,门禁构建镜像启动一遍所有应用,无相关的异常出现 - [ ] 已通过 - [x] 不涉及,无需验证 稳定性专项未执行,待完整环境验证。 ### 5. 压测专项自检 - 压测填表验证,无相关的异常出现 - [ ] 已通过 - [x] 不涉及,无需验证 压测未执行,待验证。 ### 6. 并发专项自检(taskpool/worker改动必须执行) - 图库详情页功能测试 - [ ] 已通过 - 图库相册功能测试:拍几张照片,进入图库相册功能,右上角+号创建新相册,弹窗中选择所有相册,查看是否有内容列表 - [ ] 已通过 - 备忘录图片功能测试:拍几张照片,进入备忘录新增内容,选择添加图片功能,弹窗中选择所有相册,查看是否有内容列表 - [ ] 已通过 - 畅连功能测试:登陆账号,发送30+图片,持续30+轮次 - [ ] 已通过 - 游戏功能测试(消消乐/倩女幽魂/三国志/多乐斗地主/象棋等) - [ ] 已通过 - 48小时压测 - [ ] 已通过 - wukong压测2小时验证(非Test代码需要) - [ ] 无相关crash产生 - [ ] 不涉及,无需验证 - 线程泄露测试(修改涉及线程生命周期需要,执行命令 ps -AT|grep pid|grep OS_TaskWorker|wc -l) - [ ] 无线程泄露 - [x] 不涉及,无需验证 ### 7. 需求上库自检 - 是否同步合入interface仓的相关d.ts(需求合入用同一个issue) - [ ] 已同步 - [x] 不涉及 ### 是否已执行L0用例 - [ ] 已验证 - [x] 不涉及。如不涉及,请写明理由 ## 六:将上述测试的截图贴到下面 See merge request: openharmony/commonlibrary_ets_utils!2722 | 9 days ago | |
rename CLAUDE.md to AGENTS.md Rename all CLAUDE.md files under ets_utils to AGENTS.md for unified agent entry naming. Issue: https://gitcode.com/openharmony/commonlibrary_ets_utils/issues/2543 Signed-off-by: wang_zhaoyong <wangzhaoyong@huawei.com> AI[0%] Human Fixed[0%] Human[0%] AI Adopted[0%] Change-Id: I3548adca3ddb14b1e4d540fb1f8c94d5eb7f1b5c | 19 days ago | |
Add process.appuid property and fix its UT Re-submit of PR #2725 on a fresh master-based branch (the previous branch exhausted its gate-trigger budget). Implementation is byte-identical to #2725: expose the app uid through the new process.appuid property, cache the getappuid() result (~78ns -> ~1ns, 87x faster), and let IsIsolatedProcess read the cached value (equivalent refactor: the old code already stripped the multi-user offset). Fix ProcessUidCombinedScenarioTest001: ASSERT_TRUE(isAppUidRes) assumed a real app-process identity, which no UT binary can provide (host x86 and on-device native UT both run as uid 0 without an access token, so appuid == getuid() == 0 and IsAppUid(0) is false). Derive the expectation from appUid itself (positive and, after stripping the multi-user prefix, inside the bundleId range) and drop the host guard so the case runs in every UT lane; the true path is covered by the xts HAP case. Local host run: 67/67 passed. Issue: https://gitcode.com/openharmony/commonlibrary_ets_utils/issues/2566 Signed-off-by: jizaiyi <jizaiyi@h-partners.com> Co-Authored-By: Agent AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] | 4 days ago | |
Add process.appuid property and fix its UT Re-submit of PR #2725 on a fresh master-based branch (the previous branch exhausted its gate-trigger budget). Implementation is byte-identical to #2725: expose the app uid through the new process.appuid property, cache the getappuid() result (~78ns -> ~1ns, 87x faster), and let IsIsolatedProcess read the cached value (equivalent refactor: the old code already stripped the multi-user offset). Fix ProcessUidCombinedScenarioTest001: ASSERT_TRUE(isAppUidRes) assumed a real app-process identity, which no UT binary can provide (host x86 and on-device native UT both run as uid 0 without an access token, so appuid == getuid() == 0 and IsAppUid(0) is false). Derive the expectation from appUid itself (positive and, after stripping the multi-user prefix, inside the bundleId range) and drop the host guard so the case runs in every UT lane; the true path is covered by the xts HAP case. Local host run: 67/67 passed. Issue: https://gitcode.com/openharmony/commonlibrary_ets_utils/issues/2566 Signed-off-by: jizaiyi <jizaiyi@h-partners.com> Co-Authored-By: Agent AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] | 4 days ago | |
rename CLAUDE.md to AGENTS.md Rename all CLAUDE.md files under ets_utils to AGENTS.md for unified agent entry naming. Issue: https://gitcode.com/openharmony/commonlibrary_ets_utils/issues/2543 Signed-off-by: wang_zhaoyong <wangzhaoyong@huawei.com> AI[0%] Human Fixed[0%] Human[0%] AI Adopted[0%] Change-Id: I3548adca3ddb14b1e4d540fb1f8c94d5eb7f1b5c | 19 days ago |