!4901 Cherry-pick !4857 to 4.0-Release

Merge pull request !4901 from chenlincl3/cherry-pick-1695608359
This commit is contained in:
openharmony_ci 2023-09-25 06:10:53 +00:00 committed by Gitee
commit 8a5e9aed0b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 1 deletions

View File

@ -129,6 +129,7 @@ void ModuleDeregister::IncreaseRegisterCounts(JSThread *thread, JSHandle<SourceT
requiredModule->SetLoadingTypes(LoadingTypes::STABLE_MODULE);
return;
}
increaseModule.emplace(moduleName);
LoadingTypes type = requiredModule->GetLoadingTypes();
if (type == LoadingTypes::DYNAMITC_MODULE) {
IncreaseRegisterCounts(thread, requiredModule, increaseModule);

View File

@ -505,7 +505,8 @@ JSHandle<JSTaggedValue> ModuleManager::ResolveModuleWithMerge(
JSRecordInfo recordInfo;
bool hasRecord = jsPandaFile->CheckAndGetRecordInfo(recordName, recordInfo);
if (!hasRecord) {
CString msg = "cannot find record '" + recordName + "', please check the request path.";
CString msg = "cannot find record '" + recordName + "', please check the request path.'"
+ moduleFileName + "'.";
LOG_FULL(ERROR) << msg;
THROW_NEW_ERROR_AND_RETURN_HANDLE(thread, ErrorType::REFERENCE_ERROR, JSTaggedValue, msg.c_str());
}