diff --git a/ecmascript/compiler/stub_builder-inl.h b/ecmascript/compiler/stub_builder-inl.h index 8b45278a708a3e8d25af9b757743363a46864dda..b9620b6dd3c750e96cc22e06124b34ebd953797d 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 de1f495c142619ba00df099a6308ff008bf0ff49..164cc8fc043e174e230cc6bbdb79bee7c4d36473 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 d02f1abfd7b97da8783aa3a4f07e88644856d7a5..2044ed87df0f76a9b204c779ce5c9fcd0877cf4d 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 9c1827d2f464d90ffd8dfa9e623602ff29e62383..46e58bedb227f036865d82527cbd4f1768bf7067 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 6a291a0c69dfa244e973a12a9460e5aaea77d608..573aa1cf94df892acbe48461b184359c52587cb8 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 20bdb8b7c9d5ae79532fb17b62e2e4eac55e2223..c3dcb8f26c13480e4aa5204212aee678780aa124 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 ae3a5dcf283549adedbd65cf7478dd137baa5346..fc8943e6aa2f2fdc146a1d0553af4166575a7896 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 04b67dd27add109a93cf151990759ec7fc575a1a..883e34be0a13689f729c8d142a8e4642f5fd9fe2 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 090de75597530e97f0bc436e1b25361331ffb3e0..135ba1306a1c2482fa46eda2db07f3867b28c138 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 1d17b2edfc27e2383908ab58f811b27a4827f2f8..afb95e7dcb754cc96a0218e63d3842ed277e6b88 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 9546ece0cf2ad088c534b1260b243714ff211bdc..ee15f4827f34f0aa07754616e955050466b15096 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 ecab172288a5b03ba236d5376a7b04554c4b8196..9fcc32474dd8b30f85530644ce7d8bcf2102b85f 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 49433f5e52e628ba400dfe124e8f99f152506b5d..afde27b65de1319e7028880a8487a78fe5d086a9 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 cc15dba03a7bb7df20aa31a6430d42c55ce90854..b443a5da94ae702ad69d8ae7eca8758582f914d3 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 7fdc1072c8cb50bf540d455a5176c691d4b0e80c..a54bbd3888b791bd3a6b8eb2d9b53586b47c0d4f 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 6378ac7ad988430b3ef4615b40043bdcfae3677a..a8e82de5297245a94905b4f2ae82e1266b790325 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 d1bf092c85593a30d58262a1cd7482c11ecf5748..e1dbfac8d2c778a7f0c7481f1eed22f5d3c5b247 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; }