diff --git a/frameworks/ets/ets/@ohos.app.ability.Want.ets b/frameworks/ets/ets/@ohos.app.ability.Want.ets index 2d81ad45d82b0a93fc9785d0dce455437a44fa0b..1389768cb6a26c4e56eeba19c1787e4ee81ce961 100644 --- a/frameworks/ets/ets/@ohos.app.ability.Want.ets +++ b/frameworks/ets/ets/@ohos.app.ability.Want.ets @@ -44,7 +44,7 @@ class RecordWriter { } else { const objType = Type.of(obj); if (objType instanceof ArrayType) { - this.writeBuildArray(obj as Object, Value.of(obj) as ArrayValue); + this.writeBuildArray(obj as Object, reflect.Value.of(obj) as ArrayValue); } else { this.buffer.append('null'); } diff --git a/frameworks/native/runtime/ets_runtime.cpp b/frameworks/native/runtime/ets_runtime.cpp index bd546e081bbcfbfed060cf4c7ab8d231c6a77820..fd8339c8ec058a53df1e28e830394eb821589e36 100644 --- a/frameworks/native/runtime/ets_runtime.cpp +++ b/frameworks/native/runtime/ets_runtime.cpp @@ -279,6 +279,12 @@ bool ETSRuntime::Initialize(const Options &options, std::unique_ptr & return false; } + if (jsRuntime_ != nullptr) { + auto vm = static_cast(jsRuntime_.get())->GetEcmaVm(); + panda::JSNApi::SetHostResolveBufferTrackerForHybridApp( + vm, HybridJsModuleReader(options.bundleName, options.hapPath, options.isUnique)); + } + apiTargetVersion_ = options.apiTargetVersion; TAG_LOGD(AAFwkTag::ETSRUNTIME, "Initialize: %{public}d", apiTargetVersion_); return true; diff --git a/frameworks/native/runtime/js_module_reader.cpp b/frameworks/native/runtime/js_module_reader.cpp index daf52bd7976f7ce73f51c6593e9781bcb57e7f6b..bbfe46a87a120cb692ed318ffe8f3907141ee094 100755 --- a/frameworks/native/runtime/js_module_reader.cpp +++ b/frameworks/native/runtime/js_module_reader.cpp @@ -69,8 +69,8 @@ bool JsModuleReader::operator()(const std::string& inputPath, uint8_t **buff, TAG_LOGE(AAFwkTag::JSRUNTIME, "empty realHapPath"); return false; } + needFindPluginHsp_ = true; } - needFindPluginHsp_ = true; bool newCreate = false; std::shared_ptr extractor = ExtractorUtil::GetExtractor(realHapPath, newCreate);