LibJS: Set initial state of CyclicModule.[[Status]] to NEW

This is what the specification tells us to do:
https://tc39.es/ecma262/#cyclic-module-record

Co-Authored-By: networkException <networkexception@serenityos.org>
This commit is contained in:
Andreas Kling 2023-11-17 10:56:46 +01:00
parent 01f000acb0
commit aa7501a66a
Notes: sideshowbarker 2024-07-17 02:37:08 +09:00

View file

@ -72,7 +72,7 @@ protected:
void async_module_execution_fulfilled(VM& vm);
void async_module_execution_rejected(VM& vm, Value error);
ModuleStatus m_status { ModuleStatus::Unlinked }; // [[Status]]
ModuleStatus m_status { ModuleStatus::New }; // [[Status]]
ThrowCompletionOr<void> m_evaluation_error; // [[EvaluationError]]
Optional<u32> m_dfs_index; // [[DFSIndex]]
Optional<u32> m_dfs_ancestor_index; // [[DFSAncestorIndex]]