已合并
Change hms check from startsWith to contains #15108
Change hms check from startsWith to contains #15108
已合并
jiachongchong创建于 22 天前
3 个文件变更+5-5
@@ -47,13 +47,13 @@ ecmascript/jobs/ @weng-changcheng @yingguofeng
47ecmascript/js_api/ @huanghello @xliu-huanwei47ecmascript/js_api/ @huanghello @xliu-huanwei
48ecmascript/jspandafile/ @shilei123 @weng-changcheng ^yingguofeng48ecmascript/jspandafile/ @shilei123 @weng-changcheng ^yingguofeng
49ecmascript/mem/ @dwhuawei @chentianyuu @lukai25 @xiongluo96 @yingguofeng @wanghuan202249ecmascript/mem/ @dwhuawei @chentianyuu @lukai25 @xiongluo96 @yingguofeng @wanghuan2022
50-ecmascript/module/ @yao_dashuai ^weng-changcheng @shilei123 @li-jiangfeng50+ecmascript/module/ @gong_19901 ^weng-changcheng @shilei123 @li-jiangfeng
51ecmascript/napi/ @huanghello @xliu-huanwei ^weng-changcheng @shilei12351ecmascript/napi/ @huanghello @xliu-huanwei ^weng-changcheng @shilei123
52ecmascript/patch/ @wanghuan2022 @lijiamin2019 ^weng-changcheng52ecmascript/patch/ @wanghuan2022 @lijiamin2019 ^weng-changcheng
53ecmascript/pgo_profiler/ @yingguofeng53ecmascript/pgo_profiler/ @yingguofeng
54ecmascript/quick_fix/ @wanghuan2022 @lijiamin2019 ^weng-changcheng54ecmascript/quick_fix/ @wanghuan2022 @lijiamin2019 ^weng-changcheng
55ecmascript/regexp/ @xwcai98 @chenjx-huawei @hecunmao55ecmascript/regexp/ @xwcai98 @chenjx-huawei @hecunmao
56-ecmascript/require/ @yao_dashuai ^weng-changcheng56+ecmascript/require/ @gong_19901 ^weng-changcheng
57ecmascript/serializer/ @dwhuawei @chentianyuu @lukai25 ^weng-changcheng57ecmascript/serializer/ @dwhuawei @chentianyuu @lukai25 ^weng-changcheng
58ecmascript/shared_mm/ @dwhuawei @chentianyuu @lukai25 @xiongluo96 @weng-changcheng58ecmascript/shared_mm/ @dwhuawei @chentianyuu @lukai25 @xiongluo96 @weng-changcheng
59ecmascript/shared_objects/ @chentianyuu @lukai25 @lijiamin2019 @weng-changcheng59ecmascript/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) {