mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-12-04 00:43:40 +00:00
Bugfix for empty entrypoint in aot ConcatFileName
1.When in the aot compilation phase, clear strong validation for empty entrypoint in ConcatFileName. It's permissible in compilation phase. Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I73Z3Z Signed-off-by: lijincheng <lijincheng13@huawei.com>
This commit is contained in:
parent
b266e4cbc8
commit
67866b9fa8
@ -541,7 +541,7 @@ public:
|
||||
} else {
|
||||
entryPoint = ParseThirdPartyPackage(jsPandaFile, recordName, requestName);
|
||||
}
|
||||
if (entryPoint.empty()) {
|
||||
if (entryPoint.empty() && thread->GetEcmaVM()->EnableReportModuleResolvingFailure()) {
|
||||
LOG_ECMA(ERROR) << "Failed to resolve the requested entryPoint. baseFileName : '" << baseFileName <<
|
||||
"'. RecordName : '" << recordName << "'. RequestName : '" << requestName << "'.";
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
|
@ -321,9 +321,12 @@ bool ModuleManager::IsImportedModuleLoaded(JSTaggedValue referencing)
|
||||
|
||||
bool ModuleManager::SkipDefaultBundleFile(const CString &moduleFileName) const
|
||||
{
|
||||
// relative file path like "../../xxxx" can't be loaded rightly in aot compilation phase
|
||||
const char relativeFilePath[] = "..";
|
||||
// just to skip misunderstanding error log in LoadJSPandaFile when we ignore Module Resolving Failure.
|
||||
return !vm_->EnableReportModuleResolvingFailure() &&
|
||||
base::StringHelper::StringStartWith(moduleFileName, PathHelper::BUNDLE_INSTALL_PATH);
|
||||
(base::StringHelper::StringStartWith(moduleFileName, PathHelper::BUNDLE_INSTALL_PATH) ||
|
||||
base::StringHelper::StringStartWith(moduleFileName, relativeFilePath));
|
||||
}
|
||||
|
||||
JSHandle<JSTaggedValue> ModuleManager::ResolveModuleInMergedABC(JSThread *thread, const JSPandaFile *jsPandaFile,
|
||||
|
@ -150,9 +150,10 @@ GlobalTSTypeRef TSTypeParser::ResolveImportType(const JSPandaFile *jsPandaFile,
|
||||
CString baseFileName = jsPandaFile->GetJSPandaFileDesc();
|
||||
CString entryPoint =
|
||||
base::PathHelper::ConcatFileNameWithMerge(thread_, jsPandaFile, baseFileName, recordName, cstringRelativePath);
|
||||
ASSERT_PRINT(!entryPoint.empty(),
|
||||
"EntryPoint is empty. Please check whether concating file name is correct or "
|
||||
"whether the module request recorded in the import-type literal is correct.");
|
||||
if (entryPoint.empty()) {
|
||||
LOG_COMPILER(DEBUG) << "EntryPoint is empty. Please check whether concating file name is correct or "
|
||||
"whether the module request recorded in the import-type literal is correct.";
|
||||
}
|
||||
// skip files without type information
|
||||
if (UNLIKELY(!jsPandaFile->HasTypeSummaryOffset(entryPoint))) {
|
||||
return GetAndStoreGT(jsPandaFile, typeId, recordName);
|
||||
|
Loading…
Reference in New Issue
Block a user