!61 Adaptation of modular compilation

Merge pull request !61 from DaiHN/master
This commit is contained in:
openharmony_ci 2023-06-06 08:08:31 +00:00 committed by Gitee
commit 65f9821552
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -89,7 +89,8 @@ bool JsPrintExtension::InitExtensionObj(JsRuntime &jsRuntime)
PRINT_HILOGD("Init module:%{public}s,srcPath:%{public}s.", moduleName.c_str(), srcPath.c_str());
HandleScope handleScope(jsRuntime_);
jsObj_ = jsRuntime.LoadModule(moduleName, srcPath, abilityInfo_->hapPath);
jsObj_ = jsRuntime.LoadModule(moduleName, srcPath, abilityInfo_->hapPath,
abilityInfo_->compileMode == CompileMode::ES_MODULE);
if (jsObj_ == nullptr) {
PRINT_HILOGE("Failed to get jsObj_");
return false;