From 05e790f1b916f44787ba0046a1ee12d9db3f1458 Mon Sep 17 00:00:00 2001 From: yaochaonan Date: Sat, 5 Jul 2025 22:28:12 +0800 Subject: [PATCH] Save nameBinding for so/cjs when trigger snapshot Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/ICK8TJ?from=project-issue Signed-off-by: yaochaonan Change-Id: Ib59a9e016c36513c75109f97cb69cd60d53d1edf --- ecmascript/compiler/stub_builder-inl.h | 7 ++ ecmascript/compiler/stub_builder.cpp | 3 +- ecmascript/compiler/stub_builder.h | 2 + .../dfx/hprof/tests/js_metadata_test.cpp | 7 +- ecmascript/dump.cpp | 4 + ecmascript/js_runtime_options.h | 9 +- .../resolvedindexbinding_record.json | 5 + ecmascript/module/js_module_source_text.cpp | 101 +++++++++++++++++- ecmascript/module/js_module_source_text.h | 17 ++- ecmascript/module/module_snapshot.cpp | 4 + ecmascript/module/module_value_accessor.cpp | 4 +- ecmascript/module/module_value_accessor.h | 2 +- ecmascript/object_factory.cpp | 1 + ecmascript/serializer/module_serializer.h | 5 + ecmascript/serializer/value_serializer.cpp | 2 +- ecmascript/serializer/value_serializer.h | 5 + ecmascript/shared_object_factory.cpp | 1 + 17 files changed, 170 insertions(+), 9 deletions(-) diff --git a/ecmascript/compiler/stub_builder-inl.h b/ecmascript/compiler/stub_builder-inl.h index 8b45278a70..b9620b6dd3 100644 --- a/ecmascript/compiler/stub_builder-inl.h +++ b/ecmascript/compiler/stub_builder-inl.h @@ -4413,6 +4413,13 @@ inline GateRef StubBuilder::GetIdxOfResolvedIndexBinding(GateRef resolvedBinding return LoadPrimitive(VariableType::INT32(), resolvedBinding, indexOffset); } +inline void StubBuilder::SetIsUpdatedFromResolvedBindingOfResolvedIndexBinding(GateRef glue, + GateRef resolvedBinding, GateRef value) +{ + GateRef indexOffset = IntPtr(ResolvedIndexBinding::IS_UPDATED_FROM_RESOLVED_BINDING_OFFSET); + Store(VariableType::INT32(), glue, resolvedBinding, indexOffset, value); +} + inline GateRef StubBuilder::GetIdxOfResolvedRecordIndexBinding(GateRef resolvedBinding) { GateRef indexOffset = IntPtr(ResolvedRecordIndexBinding::INDEX_OFFSET); diff --git a/ecmascript/compiler/stub_builder.cpp b/ecmascript/compiler/stub_builder.cpp index de1f495c14..164cc8fc04 100644 --- a/ecmascript/compiler/stub_builder.cpp +++ b/ecmascript/compiler/stub_builder.cpp @@ -11887,8 +11887,9 @@ GateRef StubBuilder::UpdateBindingAndGetModuleValue(GateRef glue, GateRef module Bind(¬NullOrString); { - SetValueToTaggedArray(VariableType::JS_ANY(), glue, curModuleEnv, index, resolution); CheckIsResolvedIndexBinding(glue, resolution); + SetIsUpdatedFromResolvedBindingOfResolvedIndexBinding(glue, resolution, True()); + SetValueToTaggedArray(VariableType::JS_ANY(), glue, curModuleEnv, index, resolution); result = GetValueFromExportObject(glue, exports, GetIdxOfResolvedIndexBinding(resolution)); Jump(&exit); } diff --git a/ecmascript/compiler/stub_builder.h b/ecmascript/compiler/stub_builder.h index d02f1abfd7..2044ed87df 100644 --- a/ecmascript/compiler/stub_builder.h +++ b/ecmascript/compiler/stub_builder.h @@ -1192,6 +1192,8 @@ public: inline GateRef GetResolveModuleFromResolvedIndexBinding(GateRef glue, GateRef resolvedBinding); inline GateRef GetResolveModuleFromResolvedBinding(GateRef glue, GateRef resolvedBinding); inline GateRef GetIdxOfResolvedIndexBinding(GateRef resolvedBinding); + inline void SetIsUpdatedFromResolvedBindingOfResolvedIndexBinding(GateRef glue, GateRef resolvedBinding, + GateRef value); inline GateRef GetIdxOfResolvedRecordIndexBinding(GateRef resolvedBinding); inline GateRef GetModuleRecord(GateRef glue, GateRef resolvedBinding); inline GateRef GetBindingName(GateRef glue, GateRef resolvedBinding); diff --git a/ecmascript/dfx/hprof/tests/js_metadata_test.cpp b/ecmascript/dfx/hprof/tests/js_metadata_test.cpp index 9c1827d2f4..46e58bedb2 100644 --- a/ecmascript/dfx/hprof/tests/js_metadata_test.cpp +++ b/ecmascript/dfx/hprof/tests/js_metadata_test.cpp @@ -384,7 +384,8 @@ public: {JSType::PROTO_CHANGE_MARKER, {"PROTO_CHANGE_MARKER"}}, {JSType::RB_TREENODE, {"Left", "Right", "IsRed", "RB_TREENODE"}}, {JSType::RESOLVEDBINDING_RECORD, {"Module", "BindingName", "RESOLVEDBINDING_RECORD"}}, - {JSType::RESOLVEDINDEXBINDING_RECORD, {"Module", "Index", "RESOLVEDINDEXBINDING_RECORD"}}, + {JSType::RESOLVEDINDEXBINDING_RECORD, {"Module", "Index", "IsUpdatedFromResolvedBinding", + "RESOLVEDINDEXBINDING_RECORD"}}, {JSType::RESOLVEDRECORDBINDING_RECORD, {"ModuleRecord", "BindingName", "RESOLVEDRECORDBINDING_RECORD"}}, {JSType::RESOLVEDRECORDINDEXBINDING_RECORD, {"ModuleRecord", "AbcFileName", "RESOLVEDRECORDINDEXBINDING_RECORD"}}, @@ -975,6 +976,7 @@ public: {JSType::RESOLVEDINDEXBINDING_RECORD, { ResolvedIndexBinding::MODULE_OFFSET, ResolvedIndexBinding::INDEX_OFFSET, + ResolvedIndexBinding::IS_UPDATED_FROM_RESOLVED_BINDING_OFFSET, ResolvedIndexBinding::SIZE - ResolvedIndexBinding::MODULE_OFFSET}}, {JSType::RESOLVEDRECORDBINDING_RECORD, { ResolvedRecordBinding::MODULE_RECORD_OFFSET, @@ -1716,7 +1718,8 @@ public: ResolvedBinding::SIZE - ResolvedBinding::BINDING_NAME_OFFSET}}, {JSType::RESOLVEDINDEXBINDING_RECORD, { ResolvedIndexBinding::INDEX_OFFSET - ResolvedIndexBinding::MODULE_OFFSET, - ResolvedIndexBinding::END_OFFSET - ResolvedIndexBinding::INDEX_OFFSET}}, + ResolvedIndexBinding::IS_UPDATED_FROM_RESOLVED_BINDING_OFFSET - ResolvedIndexBinding::INDEX_OFFSET, + ResolvedIndexBinding::END_OFFSET - ResolvedIndexBinding::IS_UPDATED_FROM_RESOLVED_BINDING_OFFSET}}, {JSType::RESOLVEDRECORDBINDING_RECORD, { ResolvedRecordBinding::BINDING_NAME_OFFSET - ResolvedRecordBinding::MODULE_RECORD_OFFSET, ResolvedRecordBinding::SIZE - ResolvedRecordBinding::BINDING_NAME_OFFSET}}, diff --git a/ecmascript/dump.cpp b/ecmascript/dump.cpp index 6a291a0c69..573aa1cf94 100644 --- a/ecmascript/dump.cpp +++ b/ecmascript/dump.cpp @@ -3769,6 +3769,9 @@ void ResolvedIndexBinding::Dump(const JSThread *thread, std::ostream &os) const os << " - Index: "; GetIndex(); os << "\n"; + os << " - IsUpdatedFromResolvedBinding: "; + GetIsUpdatedFromResolvedBinding(); + os << "\n"; } void ResolvedRecordIndexBinding::Dump(const JSThread *thread, std::ostream &os) const @@ -5995,6 +5998,7 @@ void ResolvedIndexBinding::DumpForSnapshot(const JSThread *thread, std::vector &vec) const diff --git a/ecmascript/js_runtime_options.h b/ecmascript/js_runtime_options.h index 20bdb8b7c9..c3dcb8f26c 100644 --- a/ecmascript/js_runtime_options.h +++ b/ecmascript/js_runtime_options.h @@ -710,7 +710,8 @@ public: } bool DisableJSPandaFileAndModuleSnapshot() const { - return (static_cast(arkProperties_) & ArkProperties::DISABLE_JSPANDAFILE_MODULE_SNAPSHOT) != 0; + return ((static_cast(arkProperties_) & ArkProperties::DISABLE_JSPANDAFILE_MODULE_SNAPSHOT) | + disableModuleSnapshot_) != 0; } bool WasSetMaxNonmovableSpaceCapacity() const @@ -2227,6 +2228,11 @@ public: return jitMethodPath_; } + void SetDisableModuleSnapshot(bool isdisable) + { + disableModuleSnapshot_ = isdisable; + } + static bool ParseBool(const std::string &arg, bool* argBool); static bool ParseInt(const std::string &arg, int* argInt); static bool ParseUint32(const std::string &arg, uint32_t* argUInt32); @@ -2545,6 +2551,7 @@ private: size_t heapSize_ = {0}; common::RuntimeParam param_; bool enableWarmStartupSmartGC_ {false}; + bool disableModuleSnapshot_ {false}; }; } // namespace panda::ecmascript diff --git a/ecmascript/js_type_metadata/resolvedindexbinding_record.json b/ecmascript/js_type_metadata/resolvedindexbinding_record.json index ae3a5dcf28..fc8943e6aa 100644 --- a/ecmascript/js_type_metadata/resolvedindexbinding_record.json +++ b/ecmascript/js_type_metadata/resolvedindexbinding_record.json @@ -10,6 +10,11 @@ "name": "Index", "offset": 8, "size": 4 + }, + { + "name": "IsUpdatedFromResolvedBinding", + "offset": 12, + "size": 4 } ], "end_offset": 16, diff --git a/ecmascript/module/js_module_source_text.cpp b/ecmascript/module/js_module_source_text.cpp index 04b67dd27a..883e34be0a 100644 --- a/ecmascript/module/js_module_source_text.cpp +++ b/ecmascript/module/js_module_source_text.cpp @@ -24,8 +24,9 @@ #include "ecmascript/module/module_message_helper.h" #include "ecmascript/module/module_path_helper.h" #include "ecmascript/module/module_tools.h" -#include "ecmascript/object_fast_operator-inl.h" #include "ecmascript/module/module_resolver.h" +#include "ecmascript/module/module_value_accessor.h" +#include "ecmascript/object_fast_operator-inl.h" #include "ecmascript/object_fast_operator-inl.h" #include "ecmascript/runtime_lock.h" #include "ecmascript/patch/quick_fix_manager.h" @@ -104,6 +105,40 @@ bool SourceTextModule::CheckCircularImport(JSThread *thread, return false; } +JSHandle SourceTextModule::GetBindingNameByIndex(JSThread *thread, + const JSHandle module, + const int index) +{ + auto globalConstants = thread->GlobalConstants(); + ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); + if (index == SourceTextModule::UNDEFINED_INDEX) { + return globalConstants->GetHandledDefaultString(); + } + + JSHandle exports = ModuleValueAccessor::GetNativeOrCjsExports(thread, module.GetTaggedValue()); + if (exports->IsJSObject()) { + JSHandle resolution(thread, JSTaggedValue::Hole()); + JSObject *exportObject = JSObject::Cast(exports.GetTaggedValue().GetTaggedObject()); + TaggedArray *properties = TaggedArray::Cast(exportObject->GetProperties(thread).GetTaggedObject()); + if (!properties->IsDictionaryMode()) { + JSHandle jsHclass(thread, exportObject->GetJSHClass()); + // Get layoutInfo and compare the input and output names of files + LayoutInfo *layoutInfo = LayoutInfo::Cast(jsHclass->GetLayout(thread).GetTaggedObject()); + if (layoutInfo->NumberOfElements() > index) { + JSHandle key(thread, layoutInfo->GetKey(thread, index)); + return key; + } + } else { + NameDictionary *dict = NameDictionary::Cast(properties); + if (dict->Size() > index) { + JSHandle key(thread, dict->GetKey(thread, index)); + return key; + } + } + } + return globalConstants->GetHandledUndefined(); +} + JSHandle SourceTextModule::ResolveExportObject(JSThread *thread, const JSHandle &module, const JSHandle &exports, @@ -1445,6 +1480,7 @@ JSHandle SourceTextModule::GetStarResolution(JSThread *thread, bool isNativeModule = IsNativeModule(moduleType); JSHandle resolution; if (UNLIKELY(isNativeModule || moduleType == ModuleTypes::CJS_MODULE)) { + thread->GetEcmaVM()->GetJSOptions().SetDisableModuleSnapshot(true); resolution = isNativeModule ? SourceTextModule::ResolveNativeStarExport(thread, importedModule, exportName) : SourceTextModule::ResolveCjsStarExport(thread, importedModule, exportName); @@ -2239,4 +2275,67 @@ void SourceTextModule::RestoreMutableFields(JSThread* thread, JSHandleSetException(thread, fields.Exception); module->SetNamespace(thread, fields.Namespace); } + +JSHandle SourceTextModule::StoreEnvironmentAndNewBindingForSerializeArray(JSThread* thread, + JSHandle serializeArray) +{ + uint32_t length = serializeArray->GetLength(); + ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); + JSHandle cachedEnvironmentArray = factory->NewTaggedArray(length); + auto globalConstants = thread->GlobalConstants(); + JSMutableHandle module(thread, globalConstants->GetUndefined()); + JSMutableHandle resolvedModule(thread, globalConstants->GetUndefined()); + JSMutableHandle binding(thread, globalConstants->GetUndefined()); + JSMutableHandle environment(thread, globalConstants->GetUndefined()); + for (uint32_t i = 0; i < length; ++i) { + module.Update(serializeArray->Get(thread, i)); + JSTaggedValue moduleEnvironment = module->GetEnvironment(thread); + // store environment + cachedEnvironmentArray->Set(thread, i, moduleEnvironment); + if (moduleEnvironment.IsUndefined()) { + continue; + } + environment.Update(moduleEnvironment); + bool isShared = SourceTextModule::IsSharedModule(module); + uint32_t len = environment->GetLength(); + // check every binding and transfer from ResolvedIndexBinding to ResolvedBinding if binding updated. + for (uint32_t idx = 0; idx < len; idx++) { + JSTaggedValue resolvedBinding = environment->Get(thread, idx); + if (resolvedBinding.IsResolvedIndexBinding()) { + binding.Update(resolvedBinding); + if (binding->GetIsUpdatedFromResolvedBinding()) { + JSHandle resolution = + CreateResolvedBindingRecordByIndex(thread, binding, isShared); + environment->Set(thread, idx, resolution); + } + } + } + } + return cachedEnvironmentArray; +} + +void SourceTextModule::RestoreSerializeArrayEnvironment(JSThread* thread, + JSHandle serializeArray, + JSHandle cachedEnvironmentArray) +{ + uint32_t len = serializeArray->GetLength(); + for (uint32_t i = 0; i < len; ++i) { + SourceTextModule *module = SourceTextModule::Cast(serializeArray->Get(thread, i)); + module->SetEnvironment(thread, cachedEnvironmentArray->Get(thread, i)); + } +} + +JSHandle SourceTextModule::CreateResolvedBindingRecordByIndex(JSThread* thread, + JSHandle binding, + bool isShared) +{ + JSHandle resolvedModule(thread, binding->GetModule(thread)); + JSHandle bindingName = + GetBindingNameByIndex(thread, resolvedModule, static_cast(binding->GetIndex())); + ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); + if (isShared) { + return JSHandle::Cast(factory->NewSResolvedBindingRecord(resolvedModule, bindingName)); + } + return JSHandle::Cast(factory->NewResolvedBindingRecord(resolvedModule, bindingName)); +} } // namespace panda::ecmascript diff --git a/ecmascript/module/js_module_source_text.h b/ecmascript/module/js_module_source_text.h index 090de75597..135ba1306a 100644 --- a/ecmascript/module/js_module_source_text.h +++ b/ecmascript/module/js_module_source_text.h @@ -94,8 +94,14 @@ public: CAST_CHECK(SourceTextModule, IsSourceTextModule); + // for module snapshot static void StoreAndResetMutableFields(JSThread *thread, JSHandle module, MutableFields &fields); static void RestoreMutableFields(JSThread *thread, JSHandle module, MutableFields &fields); + static JSHandle StoreEnvironmentAndNewBindingForSerializeArray(JSThread* thread, + JSHandle serializeArray); + static void RestoreSerializeArrayEnvironment(JSThread* thread, + JSHandle serializeArray, + JSHandle cachedEnvironmentArray); // 15.2.1.16.2 GetExportedNames(exportStarSet) static CVector GetExportedNames(JSThread *thread, const JSHandle &module, const JSHandle &exportStarSet); @@ -479,6 +485,13 @@ private: JSHandle exception); static void SetRequestedModules(JSThread *thread, JSHandle requestedModules, uint32_t idx, JSHandle requiredModule, bool isShared); + + static JSHandle GetBindingNameByIndex(JSThread *thread, + const JSHandle module, + const int index); + static JSHandle CreateResolvedBindingRecordByIndex(JSThread* thread, + JSHandle binding, + bool isShared); friend class EcmaModuleTest; friend class SharedModuleManager; @@ -501,7 +514,9 @@ public: static constexpr size_t MODULE_OFFSET = Record::SIZE; ACCESSORS(Module, MODULE_OFFSET, INDEX_OFFSET); - ACCESSORS_PRIMITIVE_FIELD(Index, int32_t, INDEX_OFFSET, END_OFFSET); + ACCESSORS_PRIMITIVE_FIELD(Index, int32_t, INDEX_OFFSET, IS_UPDATED_FROM_RESOLVED_BINDING_OFFSET); + ACCESSORS_PRIMITIVE_FIELD( + IsUpdatedFromResolvedBinding, int32_t, IS_UPDATED_FROM_RESOLVED_BINDING_OFFSET, END_OFFSET); DEFINE_ALIGN_SIZE(END_OFFSET); DECL_DUMP() diff --git a/ecmascript/module/module_snapshot.cpp b/ecmascript/module/module_snapshot.cpp index 1d17b2edfc..afb95e7dcb 100644 --- a/ecmascript/module/module_snapshot.cpp +++ b/ecmascript/module/module_snapshot.cpp @@ -106,13 +106,17 @@ std::unique_ptr ModuleSnapshot::GetSerializeData(JSThread *thread { ModuleSerializer serializer(thread); JSHandle serializeArray = GetModuleSerializeArray(thread); + JSHandle cachedEnvironmentArray = + SourceTextModule::StoreEnvironmentAndNewBindingForSerializeArray(thread, serializeArray); const GlobalEnvConstants *globalConstants = thread->GlobalConstants(); if (!serializer.WriteValue(thread, JSHandle(serializeArray), globalConstants->GetHandledUndefined(), globalConstants->GetHandledUndefined())) { LOG_ECMA(ERROR) << "ModuleSnapshot::GetSerializeData serialize failed"; + SourceTextModule::RestoreSerializeArrayEnvironment(thread, serializeArray, cachedEnvironmentArray); return nullptr; } + SourceTextModule::RestoreSerializeArrayEnvironment(thread, serializeArray, cachedEnvironmentArray); std::unique_ptr fileData = serializer.Release(); return fileData; } diff --git a/ecmascript/module/module_value_accessor.cpp b/ecmascript/module/module_value_accessor.cpp index 9546ece0cf..ee15f4827f 100644 --- a/ecmascript/module/module_value_accessor.cpp +++ b/ecmascript/module/module_value_accessor.cpp @@ -400,9 +400,11 @@ JSTaggedValue ModuleValueAccessor::UpdateBindingAndGetModuleValue(JSThread *thre } // iii. Call envRec.CreateImportBinding( // in.[[LocalName]], resolution.[[Module]], resolution.[[BindingName]]). - environment->Set(thread, index, resolution); ASSERT(resolution->IsResolvedIndexBinding()); ResolvedIndexBinding *binding = ResolvedIndexBinding::Cast(resolution.GetTaggedValue()); + // for ResolvedBinding updated to ResolvedIndexBinding, set IsUpdatedFromResolvedBinding to true. + binding->SetIsUpdatedFromResolvedBinding(true); + environment->Set(thread, index, resolution); return SourceTextModule::GetValueFromExportObject(thread, exports, binding->GetIndex()); } diff --git a/ecmascript/module/module_value_accessor.h b/ecmascript/module/module_value_accessor.h index ecab172288..9fcc32474d 100644 --- a/ecmascript/module/module_value_accessor.h +++ b/ecmascript/module/module_value_accessor.h @@ -44,6 +44,7 @@ public: static void StoreModuleValue(JSThread *thread, int32_t index, JSTaggedValue value); static void StoreModuleValue(JSThread *thread, int32_t index, JSTaggedValue value, JSTaggedValue jsFunc); + static JSHandle GetNativeOrCjsExports(JSThread *thread, JSTaggedValue resolvedModule); protected: struct GetModuleValueFromBindingInfo { JSThread *thread; @@ -91,7 +92,6 @@ protected: JSHandle requiredModule, int32_t index, bool isSendable); - static JSHandle GetNativeOrCjsExports(JSThread *thread, JSTaggedValue resolvedModule); template static JSHandle GetResolvedModule(JSThread *thread, diff --git a/ecmascript/object_factory.cpp b/ecmascript/object_factory.cpp index 49433f5e52..afde27b65d 100644 --- a/ecmascript/object_factory.cpp +++ b/ecmascript/object_factory.cpp @@ -5147,6 +5147,7 @@ JSHandle ObjectFactory::NewResolvedIndexBindingRecord(cons JSHandle obj(thread_, header); obj->SetModule(thread_, module); obj->SetIndex(index); + obj->SetIsUpdatedFromResolvedBinding(false); return obj; } diff --git a/ecmascript/serializer/module_serializer.h b/ecmascript/serializer/module_serializer.h index cc15dba03a..b443a5da94 100644 --- a/ecmascript/serializer/module_serializer.h +++ b/ecmascript/serializer/module_serializer.h @@ -27,6 +27,11 @@ public: private: bool CheckObjectCanSerialize(TaggedObject *object, bool &findSharedObject) override; bool SerializeSharedObj([[maybe_unused]] TaggedObject *object) override; + + size_t GetMaxJSSerializerSize(EcmaVM *vm) override + { + return vm->GetEcmaParamConfiguration().GetMaxJSSerializerSize() * 2; + } }; } #endif // ECMASCRIPT_SERIALIZER_MODULE_SERIALIZER_H \ No newline at end of file diff --git a/ecmascript/serializer/value_serializer.cpp b/ecmascript/serializer/value_serializer.cpp index 7fdc1072c8..a54bbd3888 100644 --- a/ecmascript/serializer/value_serializer.cpp +++ b/ecmascript/serializer/value_serializer.cpp @@ -168,7 +168,7 @@ bool ValueSerializer::WriteValue(JSThread *thread, } data_->SetDataIndex(index); } - size_t maxSerializerSize = vm_->GetEcmaParamConfiguration().GetMaxJSSerializerSize(); + size_t maxSerializerSize = GetMaxJSSerializerSize(vm_); if (data_->Size() > maxSerializerSize) { std::ostringstream errorMessage; errorMessage << "The serialization data size has exceed limit Size, current size is: " << data_->Size() diff --git a/ecmascript/serializer/value_serializer.h b/ecmascript/serializer/value_serializer.h index 6378ac7ad9..a8e82de529 100644 --- a/ecmascript/serializer/value_serializer.h +++ b/ecmascript/serializer/value_serializer.h @@ -69,6 +69,11 @@ private: // process SourceTextModule fields bool SerializeModuleCNativeObjects(TaggedObject *object); + virtual size_t GetMaxJSSerializerSize(EcmaVM *vm) + { + return vm->GetEcmaParamConfiguration().GetMaxJSSerializerSize(); + } + private: bool defaultTransfer_ {false}; bool defaultCloneShared_ {false}; diff --git a/ecmascript/shared_object_factory.cpp b/ecmascript/shared_object_factory.cpp index d1bf092c85..e1dbfac8d2 100644 --- a/ecmascript/shared_object_factory.cpp +++ b/ecmascript/shared_object_factory.cpp @@ -1020,6 +1020,7 @@ JSHandle ObjectFactory::NewSResolvedIndexBindingRecord(con JSHandle obj(thread_, header); obj->SetModule(thread_, module); obj->SetIndex(index); + obj->SetIsUpdatedFromResolvedBinding(false); return obj; } -- Gitee