已合并
Change hms check from startsWith to contains #15108
jiachongchong创建于 22 天前
Change hms check from startsWith to contains #15108
已合并
共 3 个文件变更+5-5
| @@ -47,13 +47,13 @@ ecmascript/jobs/ @weng-changcheng @yingguofeng | |||
| 47 | ecmascript/js_api/ @huanghello @xliu-huanwei | 47 | ecmascript/js_api/ @huanghello @xliu-huanwei |
| 48 | ecmascript/jspandafile/ @shilei123 @weng-changcheng ^yingguofeng | 48 | ecmascript/jspandafile/ @shilei123 @weng-changcheng ^yingguofeng |
| 49 | ecmascript/mem/ @dwhuawei @chentianyuu @lukai25 @xiongluo96 @yingguofeng @wanghuan2022 | 49 | ecmascript/mem/ @dwhuawei @chentianyuu @lukai25 @xiongluo96 @yingguofeng @wanghuan2022 |
| 50 | -ecmascript/module/ @yao_dashuai ^weng-changcheng @shilei123 @li-jiangfeng | 50 | +ecmascript/module/ @gong_19901 ^weng-changcheng @shilei123 @li-jiangfeng |
| 51 | ecmascript/napi/ @huanghello @xliu-huanwei ^weng-changcheng @shilei123 | 51 | ecmascript/napi/ @huanghello @xliu-huanwei ^weng-changcheng @shilei123 |
| 52 | ecmascript/patch/ @wanghuan2022 @lijiamin2019 ^weng-changcheng | 52 | ecmascript/patch/ @wanghuan2022 @lijiamin2019 ^weng-changcheng |
| 53 | ecmascript/pgo_profiler/ @yingguofeng | 53 | ecmascript/pgo_profiler/ @yingguofeng |
| 54 | ecmascript/quick_fix/ @wanghuan2022 @lijiamin2019 ^weng-changcheng | 54 | ecmascript/quick_fix/ @wanghuan2022 @lijiamin2019 ^weng-changcheng |
| 55 | ecmascript/regexp/ @xwcai98 @chenjx-huawei @hecunmao | 55 | ecmascript/regexp/ @xwcai98 @chenjx-huawei @hecunmao |
| 56 | -ecmascript/require/ @yao_dashuai ^weng-changcheng | 56 | +ecmascript/require/ @gong_19901 ^weng-changcheng |
| 57 | ecmascript/serializer/ @dwhuawei @chentianyuu @lukai25 ^weng-changcheng | 57 | ecmascript/serializer/ @dwhuawei @chentianyuu @lukai25 ^weng-changcheng |
| 58 | ecmascript/shared_mm/ @dwhuawei @chentianyuu @lukai25 @xiongluo96 @weng-changcheng | 58 | ecmascript/shared_mm/ @dwhuawei @chentianyuu @lukai25 @xiongluo96 @weng-changcheng |
| 59 | ecmascript/shared_objects/ @chentianyuu @lukai25 @lijiamin2019 @weng-changcheng | 59 | ecmascript/shared_objects/ @chentianyuu @lukai25 @lijiamin2019 @weng-changcheng |
| @@ -90,7 +90,7 @@ public: | |||
| 90 | static constexpr std::string_view PREFIX_BUNDLE = "@bundle:"; | 90 | static constexpr std::string_view PREFIX_BUNDLE = "@bundle:"; |
| 91 | static constexpr std::string_view PREFIX_MODULE = "@module:"; | 91 | static constexpr std::string_view PREFIX_MODULE = "@module:"; |
| 92 | static constexpr std::string_view PREFIX_PACKAGE = "@package:"; | 92 | static constexpr std::string_view PREFIX_PACKAGE = "@package:"; |
| 93 | - static constexpr std::string_view PREFIX_HMS = "hms:"; | 93 | + static constexpr std::string_view PREFIX_HMS = "hms"; |
| 94 | static constexpr std::string_view PREFIX_ETS = "ets/"; | 94 | static constexpr std::string_view PREFIX_ETS = "ets/"; |
| 95 | static constexpr std::string_view PREFIX_LIB = "lib"; | 95 | static constexpr std::string_view PREFIX_LIB = "lib"; |
| 96 | static constexpr std::string_view PREFIX_SYSTEM_LIB64_MODULE = "/system/lib64/module"; | 96 | static constexpr std::string_view PREFIX_SYSTEM_LIB64_MODULE = "/system/lib64/module"; |
| @@ -2158,8 +2158,8 @@ DEF_RUNTIME_STUBS(HandleResolutionIsNullOrString) | |||
| 2158 | ModulePathHelper::Utf8ConvertToString(thread, bindingName) + "' which imported by '" + recordStr + | 2158 | ModulePathHelper::Utf8ConvertToString(thread, bindingName) + "' which imported by '" + recordStr + |
| 2159 | "'"; | 2159 | "'"; |
| 2160 | 2160 | ||
| 2161 | - // Print hmsModules content only if requestMod starts with "hms:" | 2161 | + // Print hmsModules content only if requestMod contains "hms" |
| 2162 | - if (StringHelper::StringStartWith(requestMod, ModulePathHelper::PREFIX_HMS)) { | 2162 | + if (requestMod.find(ModulePathHelper::PREFIX_HMS) != CString::npos) { |
| 2163 | const auto& hmsModuleList = thread->GetEcmaVM()->GetHmsModuleList(); | 2163 | const auto& hmsModuleList = thread->GetEcmaVM()->GetHmsModuleList(); |
| 2164 | LOG_ECMA(ERROR) << "HMS Module List contents:"; | 2164 | LOG_ECMA(ERROR) << "HMS Module List contents:"; |
| 2165 | for (const auto& [key, hmsMap] : hmsModuleList) { | 2165 | for (const auto& [key, hmsMap] : hmsModuleList) { |