소스 검색

LibGC: Rename MarkedVector => RootVector

Let's try to make it a bit more clear that this is a Vector of GC roots.
Andreas Kling 6 달 전
부모
커밋
3bfb0534be
100개의 변경된 파일233개의 추가작업 그리고 233개의 파일을 삭제
  1. 1 1
      Libraries/LibGC/CMakeLists.txt
  2. 1 1
      Libraries/LibGC/Forward.h
  3. 2 2
      Libraries/LibGC/Heap.cpp
  4. 6 6
      Libraries/LibGC/Heap.h
  5. 1 1
      Libraries/LibGC/HeapRoot.h
  6. 5 5
      Libraries/LibGC/RootVector.cpp
  7. 19 19
      Libraries/LibGC/RootVector.h
  8. 2 2
      Libraries/LibIDL/Types.h
  9. 1 1
      Libraries/LibJS/AST.cpp
  10. 1 1
      Libraries/LibJS/Bytecode/Generator.h
  11. 3 3
      Libraries/LibJS/Bytecode/Interpreter.cpp
  12. 21 21
      Libraries/LibJS/Console.cpp
  13. 6 6
      Libraries/LibJS/Console.h
  14. 2 2
      Libraries/LibJS/Runtime/AbstractOperations.cpp
  15. 3 3
      Libraries/LibJS/Runtime/AbstractOperations.h
  16. 3 3
      Libraries/LibJS/Runtime/Array.cpp
  17. 3 3
      Libraries/LibJS/Runtime/Array.h
  18. 3 3
      Libraries/LibJS/Runtime/ArrayPrototype.cpp
  19. 1 1
      Libraries/LibJS/Runtime/ArrayPrototype.h
  20. 1 1
      Libraries/LibJS/Runtime/BoundFunction.cpp
  21. 1 1
      Libraries/LibJS/Runtime/FinalizationRegistry.cpp
  22. 1 1
      Libraries/LibJS/Runtime/FunctionPrototype.cpp
  23. 2 2
      Libraries/LibJS/Runtime/GlobalObject.h
  24. 1 1
      Libraries/LibJS/Runtime/Intl/Intl.cpp
  25. 1 1
      Libraries/LibJS/Runtime/Intl/PluralRulesPrototype.cpp
  26. 2 2
      Libraries/LibJS/Runtime/Iterator.cpp
  27. 1 1
      Libraries/LibJS/Runtime/Iterator.h
  28. 1 1
      Libraries/LibJS/Runtime/IteratorPrototype.cpp
  29. 1 1
      Libraries/LibJS/Runtime/MapConstructor.cpp
  30. 2 2
      Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp
  31. 1 1
      Libraries/LibJS/Runtime/ModuleNamespaceObject.h
  32. 4 4
      Libraries/LibJS/Runtime/Object.cpp
  33. 3 3
      Libraries/LibJS/Runtime/Object.h
  34. 3 3
      Libraries/LibJS/Runtime/ObjectConstructor.cpp
  35. 4 4
      Libraries/LibJS/Runtime/ProxyObject.cpp
  36. 1 1
      Libraries/LibJS/Runtime/ProxyObject.h
  37. 3 3
      Libraries/LibJS/Runtime/RegExpPrototype.cpp
  38. 2 2
      Libraries/LibJS/Runtime/StringObject.cpp
  39. 1 1
      Libraries/LibJS/Runtime/StringObject.h
  40. 3 3
      Libraries/LibJS/Runtime/TypedArray.cpp
  41. 4 4
      Libraries/LibJS/Runtime/TypedArray.h
  42. 3 3
      Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
  43. 9 9
      Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
  44. 1 1
      Libraries/LibJS/Runtime/VM.h
  45. 1 1
      Libraries/LibJS/Runtime/Value.cpp
  46. 1 1
      Libraries/LibJS/Runtime/Value.h
  47. 1 1
      Libraries/LibJS/Runtime/WrappedFunction.cpp
  48. 2 2
      Libraries/LibWeb/Animations/KeyframeEffect.cpp
  49. 1 1
      Libraries/LibWeb/Animations/KeyframeEffect.h
  50. 1 1
      Libraries/LibWeb/Bindings/MainThreadVM.cpp
  51. 2 2
      Libraries/LibWeb/Bindings/PlatformObject.cpp
  52. 1 1
      Libraries/LibWeb/Bindings/PlatformObject.h
  53. 1 1
      Libraries/LibWeb/CSS/CSSRuleList.cpp
  54. 1 1
      Libraries/LibWeb/CSS/CSSRuleList.h
  55. 2 2
      Libraries/LibWeb/CSS/CSSStyleSheet.cpp
  56. 1 1
      Libraries/LibWeb/CSS/FontFaceSet.cpp
  57. 1 1
      Libraries/LibWeb/CSS/Parser/MediaParsing.cpp
  58. 1 1
      Libraries/LibWeb/CSS/Parser/Parser.cpp
  59. 4 4
      Libraries/LibWeb/CSS/Parser/RuleParsing.cpp
  60. 1 1
      Libraries/LibWeb/DOM/Attr.cpp
  61. 7 7
      Libraries/LibWeb/DOM/Document.cpp
  62. 1 1
      Libraries/LibWeb/DOM/Document.h
  63. 3 3
      Libraries/LibWeb/DOM/Element.cpp
  64. 2 2
      Libraries/LibWeb/DOM/Element.h
  65. 2 2
      Libraries/LibWeb/DOM/HTMLCollection.cpp
  66. 1 1
      Libraries/LibWeb/DOM/HTMLCollection.h
  67. 2 2
      Libraries/LibWeb/DOM/LiveNodeList.cpp
  68. 1 1
      Libraries/LibWeb/DOM/LiveNodeList.h
  69. 4 4
      Libraries/LibWeb/DOM/Node.cpp
  70. 1 1
      Libraries/LibWeb/DOM/Range.cpp
  71. 1 1
      Libraries/LibWeb/Fetch/Fetching/Fetching.cpp
  72. 1 1
      Libraries/LibWeb/HTML/AudioTrackList.h
  73. 1 1
      Libraries/LibWeb/HTML/BroadcastChannel.cpp
  74. 2 2
      Libraries/LibWeb/HTML/CloseWatcherManager.cpp
  75. 2 2
      Libraries/LibWeb/HTML/CrossOrigin/AbstractOperations.cpp
  76. 1 1
      Libraries/LibWeb/HTML/CrossOrigin/AbstractOperations.h
  77. 3 3
      Libraries/LibWeb/HTML/EventLoop/TaskQueue.cpp
  78. 1 1
      Libraries/LibWeb/HTML/EventLoop/TaskQueue.h
  79. 2 2
      Libraries/LibWeb/HTML/HTMLAllCollection.cpp
  80. 1 1
      Libraries/LibWeb/HTML/HTMLAllCollection.h
  81. 1 1
      Libraries/LibWeb/HTML/HTMLImageElement.cpp
  82. 2 2
      Libraries/LibWeb/HTML/HTMLMediaElement.cpp
  83. 2 2
      Libraries/LibWeb/HTML/HTMLMediaElement.h
  84. 2 2
      Libraries/LibWeb/HTML/Location.cpp
  85. 1 1
      Libraries/LibWeb/HTML/Location.h
  86. 1 1
      Libraries/LibWeb/HTML/MessageEvent.cpp
  87. 1 1
      Libraries/LibWeb/HTML/Navigation.cpp
  88. 1 1
      Libraries/LibWeb/HTML/StructuredSerialize.cpp
  89. 1 1
      Libraries/LibWeb/HTML/StructuredSerializeTypes.h
  90. 1 1
      Libraries/LibWeb/HTML/TextTrackCue.h
  91. 1 1
      Libraries/LibWeb/HTML/TextTrackCueList.h
  92. 1 1
      Libraries/LibWeb/HTML/TextTrackList.h
  93. 1 1
      Libraries/LibWeb/HTML/VideoTrackList.h
  94. 2 2
      Libraries/LibWeb/HTML/Window.cpp
  95. 4 4
      Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.cpp
  96. 3 3
      Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.h
  97. 3 3
      Libraries/LibWeb/HTML/WindowProxy.cpp
  98. 1 1
      Libraries/LibWeb/HTML/WindowProxy.h
  99. 2 2
      Libraries/LibWeb/HTML/WorkerDebugConsoleClient.cpp
  100. 1 1
      Libraries/LibWeb/ResizeObserver/ResizeObserverEntry.cpp

+ 1 - 1
Libraries/LibGC/CMakeLists.txt

@@ -5,9 +5,9 @@ set(SOURCES
     ConservativeVector.cpp
     ForeignCell.cpp
     Root.cpp
+    RootVector.cpp
     Heap.cpp
     HeapBlock.cpp
-    MarkedVector.cpp
     WeakContainer.cpp
 )
 

+ 1 - 1
Libraries/LibGC/Forward.h

@@ -30,6 +30,6 @@ template<class T, size_t inline_capacity = 0>
 class ConservativeVector;
 
 template<class T, size_t inline_capacity = 0>
-class MarkedVector;
+class RootVector;
 
 }

+ 2 - 2
Libraries/LibGC/Heap.cpp

@@ -187,8 +187,8 @@ public:
                 case HeapRoot::Type::Root:
                     node.set("root"sv, ByteString::formatted("Root {} {}:{}", location->function_name(), location->filename(), location->line_number()));
                     break;
-                case HeapRoot::Type::MarkedVector:
-                    node.set("root"sv, "MarkedVector");
+                case HeapRoot::Type::RootVector:
+                    node.set("root"sv, "RootVector");
                     break;
                 case HeapRoot::Type::RegisterPointer:
                     node.set("root"sv, "RegisterPointer");

+ 6 - 6
Libraries/LibGC/Heap.h

@@ -23,8 +23,8 @@
 #include <LibGC/Forward.h>
 #include <LibGC/HeapRoot.h>
 #include <LibGC/Internals.h>
-#include <LibGC/MarkedVector.h>
 #include <LibGC/Root.h>
+#include <LibGC/RootVector.h>
 #include <LibGC/WeakContainer.h>
 
 namespace GC {
@@ -61,8 +61,8 @@ public:
     void did_create_root(Badge<RootImpl>, RootImpl&);
     void did_destroy_root(Badge<RootImpl>, RootImpl&);
 
-    void did_create_marked_vector(Badge<MarkedVectorBase>, MarkedVectorBase&);
-    void did_destroy_marked_vector(Badge<MarkedVectorBase>, MarkedVectorBase&);
+    void did_create_marked_vector(Badge<RootVectorBase>, RootVectorBase&);
+    void did_destroy_marked_vector(Badge<RootVectorBase>, RootVectorBase&);
 
     void did_create_conservative_vector(Badge<ConservativeVectorBase>, ConservativeVectorBase&);
     void did_destroy_conservative_vector(Badge<ConservativeVectorBase>, ConservativeVectorBase&);
@@ -139,7 +139,7 @@ private:
     CellAllocator::List m_all_cell_allocators;
 
     RootImpl::List m_roots;
-    MarkedVectorBase::List m_marked_vectors;
+    RootVectorBase::List m_marked_vectors;
     ConservativeVectorBase::List m_conservative_vectors;
     WeakContainer::List m_weak_containers;
 
@@ -165,13 +165,13 @@ inline void Heap::did_destroy_root(Badge<RootImpl>, RootImpl& impl)
     m_roots.remove(impl);
 }
 
-inline void Heap::did_create_marked_vector(Badge<MarkedVectorBase>, MarkedVectorBase& vector)
+inline void Heap::did_create_marked_vector(Badge<RootVectorBase>, RootVectorBase& vector)
 {
     VERIFY(!m_marked_vectors.contains(vector));
     m_marked_vectors.append(vector);
 }
 
-inline void Heap::did_destroy_marked_vector(Badge<MarkedVectorBase>, MarkedVectorBase& vector)
+inline void Heap::did_destroy_marked_vector(Badge<RootVectorBase>, RootVectorBase& vector)
 {
     VERIFY(m_marked_vectors.contains(vector));
     m_marked_vectors.remove(vector);

+ 1 - 1
Libraries/LibGC/HeapRoot.h

@@ -14,7 +14,7 @@ struct HeapRoot {
     enum class Type {
         HeapFunctionCapturedPointer,
         Root,
-        MarkedVector,
+        RootVector,
         ConservativeVector,
         RegisterPointer,
         StackPointer,

+ 5 - 5
Libraries/LibGC/MarkedVector.cpp → Libraries/LibGC/RootVector.cpp

@@ -6,27 +6,27 @@
  */
 
 #include <LibGC/Heap.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 
 namespace GC {
 
-MarkedVectorBase::MarkedVectorBase(Heap& heap)
+RootVectorBase::RootVectorBase(Heap& heap)
     : m_heap(&heap)
 {
     m_heap->did_create_marked_vector({}, *this);
 }
 
-MarkedVectorBase::~MarkedVectorBase()
+RootVectorBase::~RootVectorBase()
 {
     m_heap->did_destroy_marked_vector({}, *this);
 }
 
-MarkedVectorBase& MarkedVectorBase::operator=(MarkedVectorBase const& other)
+RootVectorBase& RootVectorBase::operator=(RootVectorBase const& other)
 {
     if (m_heap != other.m_heap) {
         m_heap = other.m_heap;
 
-        // NOTE: IntrusiveList will remove this MarkedVectorBase from the old heap it was part of.
+        // NOTE: IntrusiveList will remove this RootVectorBase from the old heap it was part of.
         m_heap->did_create_marked_vector({}, *this);
     }
 

+ 19 - 19
Libraries/LibGC/MarkedVector.h → Libraries/LibGC/RootVector.h

@@ -16,52 +16,52 @@
 
 namespace GC {
 
-class MarkedVectorBase {
+class RootVectorBase {
 public:
     virtual void gather_roots(HashMap<Cell*, GC::HeapRoot>&) const = 0;
 
 protected:
-    explicit MarkedVectorBase(Heap&);
-    ~MarkedVectorBase();
+    explicit RootVectorBase(Heap&);
+    ~RootVectorBase();
 
-    MarkedVectorBase& operator=(MarkedVectorBase const&);
+    RootVectorBase& operator=(RootVectorBase const&);
 
     Heap* m_heap { nullptr };
-    IntrusiveListNode<MarkedVectorBase> m_list_node;
+    IntrusiveListNode<RootVectorBase> m_list_node;
 
 public:
-    using List = IntrusiveList<&MarkedVectorBase::m_list_node>;
+    using List = IntrusiveList<&RootVectorBase::m_list_node>;
 };
 
 template<typename T, size_t inline_capacity>
-class MarkedVector final
-    : public MarkedVectorBase
+class RootVector final
+    : public RootVectorBase
     , public Vector<T, inline_capacity> {
 
 public:
-    explicit MarkedVector(Heap& heap)
-        : MarkedVectorBase(heap)
+    explicit RootVector(Heap& heap)
+        : RootVectorBase(heap)
     {
     }
 
-    virtual ~MarkedVector() = default;
+    virtual ~RootVector() = default;
 
-    MarkedVector(MarkedVector const& other)
-        : MarkedVectorBase(*other.m_heap)
+    RootVector(RootVector const& other)
+        : RootVectorBase(*other.m_heap)
         , Vector<T, inline_capacity>(other)
     {
     }
 
-    MarkedVector(MarkedVector&& other)
-        : MarkedVectorBase(*other.m_heap)
+    RootVector(RootVector&& other)
+        : RootVectorBase(*other.m_heap)
         , Vector<T, inline_capacity>(move(static_cast<Vector<T, inline_capacity>&>(other)))
     {
     }
 
-    MarkedVector& operator=(MarkedVector const& other)
+    RootVector& operator=(RootVector const& other)
     {
         Vector<T, inline_capacity>::operator=(other);
-        MarkedVectorBase::operator=(other);
+        RootVectorBase::operator=(other);
         return *this;
     }
 
@@ -70,9 +70,9 @@ public:
         for (auto& value : *this) {
             if constexpr (IsBaseOf<NanBoxedValue, T>) {
                 if (value.is_cell())
-                    roots.set(&const_cast<T&>(value).as_cell(), HeapRoot { .type = HeapRoot::Type::MarkedVector });
+                    roots.set(&const_cast<T&>(value).as_cell(), HeapRoot { .type = HeapRoot::Type::RootVector });
             } else {
-                roots.set(value, HeapRoot { .type = HeapRoot::Type::MarkedVector });
+                roots.set(value, HeapRoot { .type = HeapRoot::Type::RootVector });
             }
         }
     }

+ 2 - 2
Libraries/LibIDL/Types.h

@@ -32,8 +32,8 @@ static size_t get_function_shortest_length(FunctionType& function)
 }
 
 enum class SequenceStorageType {
-    Vector,       // Used to safely store non-JS values
-    MarkedVector, // Used to safely store JS::Value and anything that inherits JS::Cell, e.g. JS::Object
+    Vector,     // Used to safely store non-JS values
+    RootVector, // Used to safely store JS::Value and anything that inherits JS::Cell, e.g. JS::Object
 };
 
 struct CppType {

+ 1 - 1
Libraries/LibJS/AST.cpp

@@ -14,7 +14,7 @@
 #include <AK/TemporaryChange.h>
 #include <LibCrypto/BigInt/SignedBigInteger.h>
 #include <LibGC/ConservativeVector.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/AST.h>
 #include <LibJS/Runtime/AbstractOperations.h>
 #include <LibJS/Runtime/Accessor.h>

+ 1 - 1
Libraries/LibJS/Bytecode/Generator.h

@@ -373,7 +373,7 @@ private:
     NonnullOwnPtr<StringTable> m_string_table;
     NonnullOwnPtr<IdentifierTable> m_identifier_table;
     NonnullOwnPtr<RegexTable> m_regex_table;
-    GC::MarkedVector<Value> m_constants;
+    GC::RootVector<Value> m_constants;
 
     mutable Optional<ScopedOperand> m_true_constant;
     mutable Optional<ScopedOperand> m_false_constant;

+ 3 - 3
Libraries/LibJS/Bytecode/Interpreter.cpp

@@ -1458,13 +1458,13 @@ inline Value new_regexp(VM& vm, ParsedRegex const& parsed_regex, ByteString cons
 }
 
 // 13.3.8.1 https://tc39.es/ecma262/#sec-runtime-semantics-argumentlistevaluation
-inline GC::MarkedVector<Value> argument_list_evaluation(VM& vm, Value arguments)
+inline GC::RootVector<Value> argument_list_evaluation(VM& vm, Value arguments)
 {
     // Note: Any spreading and actual evaluation is handled in preceding opcodes
     // Note: The spec uses the concept of a list, while we create a temporary array
     //       in the preceding opcodes, so we have to convert in a manner that is not
     //       visible to the user
-    GC::MarkedVector<Value> argument_values { vm.heap() };
+    GC::RootVector<Value> argument_values { vm.heap() };
 
     auto& argument_array = arguments.as_array();
     auto array_length = argument_array.indexed_properties().array_like_size();
@@ -1541,7 +1541,7 @@ inline ThrowCompletionOr<GC::Ref<Object>> super_call_with_argument_array(VM& vm,
     auto* func = get_super_constructor(vm);
 
     // 4. Let argList be ? ArgumentListEvaluation of Arguments.
-    GC::MarkedVector<Value> arg_list { vm.heap() };
+    GC::RootVector<Value> arg_list { vm.heap() };
     if (is_synthetic) {
         VERIFY(argument_array.is_object() && is<Array>(argument_array.as_object()));
         auto const& array_value = static_cast<Array const&>(argument_array.as_object());

+ 21 - 21
Libraries/LibJS/Console.cpp

@@ -51,7 +51,7 @@ ThrowCompletionOr<Value> Console::assert_()
     auto message = PrimitiveString::create(vm, "Assertion failed"_string);
 
     // NOTE: Assemble `data` from the function arguments.
-    GC::MarkedVector<Value> data { vm.heap() };
+    GC::RootVector<Value> data { vm.heap() };
     if (vm.argument_count() > 1) {
         data.ensure_capacity(vm.argument_count() - 1);
         for (size_t i = 1; i < vm.argument_count(); ++i) {
@@ -143,7 +143,7 @@ ThrowCompletionOr<Value> Console::log()
 }
 
 // To [create table row] given tabularDataItem, rowIndex, list finalColumns, and optional list properties, perform the following steps:
-static ThrowCompletionOr<GC::Ref<Object>> create_table_row(Realm& realm, Value row_index, Value tabular_data_item, GC::MarkedVector<Value>& final_columns, HashMap<PropertyKey, bool>& visited_columns, HashMap<PropertyKey, bool>& properties)
+static ThrowCompletionOr<GC::Ref<Object>> create_table_row(Realm& realm, Value row_index, Value tabular_data_item, GC::RootVector<Value>& final_columns, HashMap<PropertyKey, bool>& visited_columns, HashMap<PropertyKey, bool>& properties)
 {
     auto& vm = realm.vm();
 
@@ -264,10 +264,10 @@ ThrowCompletionOr<Value> Console::table()
         }
 
         // 1. Let `finalRows` be the new list, initially empty
-        GC::MarkedVector<Value> final_rows(vm.heap());
+        GC::RootVector<Value> final_rows(vm.heap());
 
         // 2. Let `finalColumns` be the new list, initially empty
-        GC::MarkedVector<Value> final_columns(vm.heap());
+        GC::RootVector<Value> final_columns(vm.heap());
 
         HashMap<PropertyKey, bool> visited_columns;
 
@@ -327,7 +327,7 @@ ThrowCompletionOr<Value> Console::table()
             TRY(final_data->set(vm.names.columns, table_cols, Object::ShouldThrowExceptions::No));
 
             // 5.4. Perform `Printer("table", finalData)`
-            GC::MarkedVector<Value> args(vm.heap());
+            GC::RootVector<Value> args(vm.heap());
             args.append(Value(final_data));
             return m_client->printer(LogLevel::Table, args);
         }
@@ -389,7 +389,7 @@ ThrowCompletionOr<Value> Console::dir()
 
     // 2. Perform Printer("dir", « object », options).
     if (m_client) {
-        GC::MarkedVector<Value> printer_arguments { vm.heap() };
+        GC::RootVector<Value> printer_arguments { vm.heap() };
         TRY_OR_THROW_OOM(vm, printer_arguments.try_append(object));
 
         return m_client->printer(LogLevel::Dir, move(printer_arguments));
@@ -429,7 +429,7 @@ ThrowCompletionOr<Value> Console::count()
     auto concat = TRY_OR_THROW_OOM(vm, String::formatted("{}: {}", label, map.get(label).value()));
 
     // 5. Perform Logger("count", « concat »).
-    GC::MarkedVector<Value> concat_as_vector { vm.heap() };
+    GC::RootVector<Value> concat_as_vector { vm.heap() };
     concat_as_vector.append(PrimitiveString::create(vm, move(concat)));
     if (m_client)
         TRY(m_client->logger(LogLevel::Count, concat_as_vector));
@@ -457,7 +457,7 @@ ThrowCompletionOr<Value> Console::count_reset()
         //    that the given label does not have an associated count.
         auto message = TRY_OR_THROW_OOM(vm, String::formatted("\"{}\" doesn't have a count", label));
         // 2. Perform Logger("countReset", « message »);
-        GC::MarkedVector<Value> message_as_vector { vm.heap() };
+        GC::RootVector<Value> message_as_vector { vm.heap() };
         message_as_vector.append(PrimitiveString::create(vm, move(message)));
         if (m_client)
             TRY(m_client->logger(LogLevel::CountReset, message_as_vector));
@@ -560,7 +560,7 @@ ThrowCompletionOr<Value> Console::time()
     //    a warning to the console indicating that a timer with label `label` has already been started.
     if (m_timer_table.contains(label)) {
         if (m_client) {
-            GC::MarkedVector<Value> timer_already_exists_warning_message_as_vector { vm.heap() };
+            GC::RootVector<Value> timer_already_exists_warning_message_as_vector { vm.heap() };
 
             auto message = TRY_OR_THROW_OOM(vm, String::formatted("Timer '{}' already exists.", label));
             timer_already_exists_warning_message_as_vector.append(PrimitiveString::create(vm, move(message)));
@@ -591,7 +591,7 @@ ThrowCompletionOr<Value> Console::time_log()
     // NOTE: Warn if the timer doesn't exist. Not part of the spec yet, but discussed here: https://github.com/whatwg/console/issues/134
     if (maybe_start_time == m_timer_table.end()) {
         if (m_client) {
-            GC::MarkedVector<Value> timer_does_not_exist_warning_message_as_vector { vm.heap() };
+            GC::RootVector<Value> timer_does_not_exist_warning_message_as_vector { vm.heap() };
 
             auto message = TRY_OR_THROW_OOM(vm, String::formatted("Timer '{}' does not exist.", label));
             timer_does_not_exist_warning_message_as_vector.append(PrimitiveString::create(vm, move(message)));
@@ -609,7 +609,7 @@ ThrowCompletionOr<Value> Console::time_log()
     auto concat = TRY_OR_THROW_OOM(vm, String::formatted("{}: {}", label, duration));
 
     // 5. Prepend concat to data.
-    GC::MarkedVector<Value> data { vm.heap() };
+    GC::RootVector<Value> data { vm.heap() };
     data.ensure_capacity(vm.argument_count());
     data.append(PrimitiveString::create(vm, move(concat)));
     for (size_t i = 1; i < vm.argument_count(); ++i)
@@ -637,7 +637,7 @@ ThrowCompletionOr<Value> Console::time_end()
     // NOTE: Warn if the timer doesn't exist. Not part of the spec yet, but discussed here: https://github.com/whatwg/console/issues/134
     if (maybe_start_time == m_timer_table.end()) {
         if (m_client) {
-            GC::MarkedVector<Value> timer_does_not_exist_warning_message_as_vector { vm.heap() };
+            GC::RootVector<Value> timer_does_not_exist_warning_message_as_vector { vm.heap() };
 
             auto message = TRY_OR_THROW_OOM(vm, String::formatted("Timer '{}' does not exist.", label));
             timer_does_not_exist_warning_message_as_vector.append(PrimitiveString::create(vm, move(message)));
@@ -659,18 +659,18 @@ ThrowCompletionOr<Value> Console::time_end()
 
     // 6. Perform Printer("timeEnd", « concat »).
     if (m_client) {
-        GC::MarkedVector<Value> concat_as_vector { vm.heap() };
+        GC::RootVector<Value> concat_as_vector { vm.heap() };
         concat_as_vector.append(PrimitiveString::create(vm, move(concat)));
         TRY(m_client->printer(LogLevel::TimeEnd, move(concat_as_vector)));
     }
     return js_undefined();
 }
 
-GC::MarkedVector<Value> Console::vm_arguments()
+GC::RootVector<Value> Console::vm_arguments()
 {
     auto& vm = realm().vm();
 
-    GC::MarkedVector<Value> arguments { vm.heap() };
+    GC::RootVector<Value> arguments { vm.heap() };
     arguments.ensure_capacity(vm.argument_count());
     for (size_t i = 0; i < vm.argument_count(); ++i) {
         arguments.append(vm.argument(i));
@@ -708,7 +708,7 @@ void Console::report_exception(JS::Error const& exception, bool in_promise) cons
         m_client->report_exception(exception, in_promise);
 }
 
-ThrowCompletionOr<String> Console::value_vector_to_string(GC::MarkedVector<Value> const& values)
+ThrowCompletionOr<String> Console::value_vector_to_string(GC::RootVector<Value> const& values)
 {
     auto& vm = realm().vm();
     StringBuilder builder;
@@ -737,7 +737,7 @@ void ConsoleClient::visit_edges(Visitor& visitor)
 }
 
 // 2.1. Logger(logLevel, args), https://console.spec.whatwg.org/#logger
-ThrowCompletionOr<Value> ConsoleClient::logger(Console::LogLevel log_level, GC::MarkedVector<Value> const& args)
+ThrowCompletionOr<Value> ConsoleClient::logger(Console::LogLevel log_level, GC::RootVector<Value> const& args)
 {
     auto& vm = m_console->realm().vm();
 
@@ -753,7 +753,7 @@ ThrowCompletionOr<Value> ConsoleClient::logger(Console::LogLevel log_level, GC::
 
     // 4. If rest is empty, perform Printer(logLevel, « first ») and return.
     if (rest_size == 0) {
-        GC::MarkedVector<Value> first_as_vector { vm.heap() };
+        GC::RootVector<Value> first_as_vector { vm.heap() };
         first_as_vector.append(first);
         return printer(log_level, move(first_as_vector));
     }
@@ -769,7 +769,7 @@ ThrowCompletionOr<Value> ConsoleClient::logger(Console::LogLevel log_level, GC::
 }
 
 // 2.2. Formatter(args), https://console.spec.whatwg.org/#formatter
-ThrowCompletionOr<GC::MarkedVector<Value>> ConsoleClient::formatter(GC::MarkedVector<Value> const& args)
+ThrowCompletionOr<GC::RootVector<Value>> ConsoleClient::formatter(GC::RootVector<Value> const& args)
 {
     auto& realm = m_console->realm();
     auto& vm = realm.vm();
@@ -871,7 +871,7 @@ ThrowCompletionOr<GC::MarkedVector<Value>> ConsoleClient::formatter(GC::MarkedVe
     }
 
     // 7. Let result be a list containing target together with the elements of args starting from the third onward.
-    GC::MarkedVector<Value> result { vm.heap() };
+    GC::RootVector<Value> result { vm.heap() };
     result.ensure_capacity(args.size() - 1);
     result.empend(PrimitiveString::create(vm, move(target)));
     for (size_t i = 2; i < args.size(); ++i)
@@ -881,7 +881,7 @@ ThrowCompletionOr<GC::MarkedVector<Value>> ConsoleClient::formatter(GC::MarkedVe
     return formatter(result);
 }
 
-ThrowCompletionOr<String> ConsoleClient::generically_format_values(GC::MarkedVector<Value> const& values)
+ThrowCompletionOr<String> ConsoleClient::generically_format_values(GC::RootVector<Value> const& values)
 {
     AllocatingMemoryStream stream;
     auto& vm = m_console->realm().vm();

+ 6 - 6
Libraries/LibJS/Console.h

@@ -63,7 +63,7 @@ public:
 
     Realm& realm() const { return m_realm; }
 
-    GC::MarkedVector<Value> vm_arguments();
+    GC::RootVector<Value> vm_arguments();
 
     HashMap<String, unsigned>& counters() { return m_counters; }
     HashMap<String, unsigned> const& counters() const { return m_counters; }
@@ -95,7 +95,7 @@ private:
 
     virtual void visit_edges(Visitor&) override;
 
-    ThrowCompletionOr<String> value_vector_to_string(GC::MarkedVector<Value> const&);
+    ThrowCompletionOr<String> value_vector_to_string(GC::RootVector<Value> const&);
 
     GC::Ref<Realm> m_realm;
     GC::Ptr<ConsoleClient> m_client;
@@ -110,10 +110,10 @@ class ConsoleClient : public Cell {
     GC_DECLARE_ALLOCATOR(ConsoleClient);
 
 public:
-    using PrinterArguments = Variant<Console::Group, Console::Trace, GC::MarkedVector<Value>>;
+    using PrinterArguments = Variant<Console::Group, Console::Trace, GC::RootVector<Value>>;
 
-    ThrowCompletionOr<Value> logger(Console::LogLevel log_level, GC::MarkedVector<Value> const& args);
-    ThrowCompletionOr<GC::MarkedVector<Value>> formatter(GC::MarkedVector<Value> const& args);
+    ThrowCompletionOr<Value> logger(Console::LogLevel log_level, GC::RootVector<Value> const& args);
+    ThrowCompletionOr<GC::RootVector<Value>> formatter(GC::RootVector<Value> const& args);
     virtual ThrowCompletionOr<Value> printer(Console::LogLevel log_level, PrinterArguments) = 0;
 
     virtual void add_css_style_to_current_message(StringView) { }
@@ -122,7 +122,7 @@ public:
     virtual void clear() = 0;
     virtual void end_group() = 0;
 
-    ThrowCompletionOr<String> generically_format_values(GC::MarkedVector<Value> const&);
+    ThrowCompletionOr<String> generically_format_values(GC::RootVector<Value> const&);
 
 protected:
     explicit ConsoleClient(Console&);

+ 2 - 2
Libraries/LibJS/Runtime/AbstractOperations.cpp

@@ -97,7 +97,7 @@ ThrowCompletionOr<size_t> length_of_array_like(VM& vm, Object const& object)
 }
 
 // 7.3.20 CreateListFromArrayLike ( obj [ , elementTypes ] ), https://tc39.es/ecma262/#sec-createlistfromarraylike
-ThrowCompletionOr<GC::MarkedVector<Value>> create_list_from_array_like(VM& vm, Value value, Function<ThrowCompletionOr<void>(Value)> check_value)
+ThrowCompletionOr<GC::RootVector<Value>> create_list_from_array_like(VM& vm, Value value, Function<ThrowCompletionOr<void>(Value)> check_value)
 {
     // 1. If elementTypes is not present, set elementTypes to « Undefined, Null, Boolean, String, Symbol, Number, BigInt, Object ».
 
@@ -111,7 +111,7 @@ ThrowCompletionOr<GC::MarkedVector<Value>> create_list_from_array_like(VM& vm, V
     auto length = TRY(length_of_array_like(vm, array_like));
 
     // 4. Let list be a new empty List.
-    auto list = GC::MarkedVector<Value> { vm.heap() };
+    auto list = GC::RootVector<Value> { vm.heap() };
     list.ensure_capacity(length);
 
     // 5. Let index be 0.

+ 3 - 3
Libraries/LibJS/Runtime/AbstractOperations.h

@@ -9,7 +9,7 @@
 #include <AK/Concepts.h>
 #include <AK/Forward.h>
 #include <LibCrypto/Forward.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/Forward.h>
 #include <LibJS/Runtime/CanonicalIndex.h>
 #include <LibJS/Runtime/FunctionObject.h>
@@ -34,7 +34,7 @@ ThrowCompletionOr<Value> call_impl(VM&, Value function, Value this_value, Readon
 ThrowCompletionOr<Value> call_impl(VM&, FunctionObject& function, Value this_value, ReadonlySpan<Value> arguments = {});
 ThrowCompletionOr<GC::Ref<Object>> construct_impl(VM&, FunctionObject&, ReadonlySpan<Value> arguments = {}, FunctionObject* new_target = nullptr);
 ThrowCompletionOr<size_t> length_of_array_like(VM&, Object const&);
-ThrowCompletionOr<GC::MarkedVector<Value>> create_list_from_array_like(VM&, Value, Function<ThrowCompletionOr<void>(Value)> = {});
+ThrowCompletionOr<GC::RootVector<Value>> create_list_from_array_like(VM&, Value, Function<ThrowCompletionOr<void>(Value)> = {});
 ThrowCompletionOr<FunctionObject*> species_constructor(VM&, Object const&, FunctionObject& default_constructor);
 ThrowCompletionOr<Realm*> get_function_realm(VM&, FunctionObject const&);
 ThrowCompletionOr<void> initialize_bound_name(VM&, DeprecatedFlyString const&, Value, Environment*);
@@ -199,7 +199,7 @@ void add_value_to_keyed_group(VM& vm, GroupsType& groups, KeyType key, Value val
     }
 
     // 2. Let group be the Record { [[Key]]: key, [[Elements]]: « value » }.
-    GC::MarkedVector<Value> new_elements { vm.heap() };
+    GC::RootVector<Value> new_elements { vm.heap() };
     new_elements.append(value);
 
     // 3. Append group as the last element of groups.

+ 3 - 3
Libraries/LibJS/Runtime/Array.cpp

@@ -161,10 +161,10 @@ ThrowCompletionOr<bool> Array::set_length(PropertyDescriptor const& property_des
 }
 
 // 23.1.3.30.1 SortIndexedProperties ( obj, len, SortCompare, holes ), https://tc39.es/ecma262/#sec-sortindexedproperties
-ThrowCompletionOr<GC::MarkedVector<Value>> sort_indexed_properties(VM& vm, Object const& object, size_t length, Function<ThrowCompletionOr<double>(Value, Value)> const& sort_compare, Holes holes)
+ThrowCompletionOr<GC::RootVector<Value>> sort_indexed_properties(VM& vm, Object const& object, size_t length, Function<ThrowCompletionOr<double>(Value, Value)> const& sort_compare, Holes holes)
 {
     // 1. Let items be a new empty List.
-    auto items = GC::MarkedVector<Value> { vm.heap() };
+    auto items = GC::RootVector<Value> { vm.heap() };
 
     // 2. Let k be 0.
     // 3. Repeat, while k < len,
@@ -330,7 +330,7 @@ ThrowCompletionOr<bool> Array::internal_delete(PropertyKey const& property_key)
 }
 
 // NON-STANDARD: Used to inject the ephemeral length property's key
-ThrowCompletionOr<GC::MarkedVector<Value>> Array::internal_own_property_keys() const
+ThrowCompletionOr<GC::RootVector<Value>> Array::internal_own_property_keys() const
 {
     auto& vm = this->vm();
     auto keys = TRY(Object::internal_own_property_keys());

+ 3 - 3
Libraries/LibJS/Runtime/Array.h

@@ -37,7 +37,7 @@ public:
     template<typename T>
     static GC::Ref<Array> create_from(Realm& realm, ReadonlySpan<T> elements, Function<Value(T const&)> map_fn)
     {
-        auto values = GC::MarkedVector<Value> { realm.heap() };
+        auto values = GC::RootVector<Value> { realm.heap() };
         values.ensure_capacity(elements.size());
         for (auto const& element : elements)
             values.append(map_fn(element));
@@ -50,7 +50,7 @@ public:
     virtual ThrowCompletionOr<Optional<PropertyDescriptor>> internal_get_own_property(PropertyKey const&) const override final;
     virtual ThrowCompletionOr<bool> internal_define_own_property(PropertyKey const&, PropertyDescriptor const&, Optional<PropertyDescriptor>* precomputed_get_own_property = nullptr) override final;
     virtual ThrowCompletionOr<bool> internal_delete(PropertyKey const&) override;
-    virtual ThrowCompletionOr<GC::MarkedVector<Value>> internal_own_property_keys() const override final;
+    virtual ThrowCompletionOr<GC::RootVector<Value>> internal_own_property_keys() const override final;
 
     [[nodiscard]] bool length_is_writable() const { return m_length_writable; }
 
@@ -68,7 +68,7 @@ enum class Holes {
     ReadThroughHoles,
 };
 
-ThrowCompletionOr<GC::MarkedVector<Value>> sort_indexed_properties(VM&, Object const&, size_t length, Function<ThrowCompletionOr<double>(Value, Value)> const& sort_compare, Holes holes);
+ThrowCompletionOr<GC::RootVector<Value>> sort_indexed_properties(VM&, Object const&, size_t length, Function<ThrowCompletionOr<double>(Value, Value)> const& sort_compare, Holes holes);
 ThrowCompletionOr<double> compare_array_elements(VM&, Value x, Value y, FunctionObject* comparefn);
 
 }

+ 3 - 3
Libraries/LibJS/Runtime/ArrayPrototype.cpp

@@ -1339,15 +1339,15 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::some)
     return Value(false);
 }
 
-ThrowCompletionOr<void> array_merge_sort(VM& vm, Function<ThrowCompletionOr<double>(Value, Value)> const& compare_func, GC::MarkedVector<Value>& arr_to_sort)
+ThrowCompletionOr<void> array_merge_sort(VM& vm, Function<ThrowCompletionOr<double>(Value, Value)> const& compare_func, GC::RootVector<Value>& arr_to_sort)
 {
     // FIXME: it would probably be better to switch to insertion sort for small arrays for
     // better performance
     if (arr_to_sort.size() <= 1)
         return {};
 
-    GC::MarkedVector<Value> left(vm.heap());
-    GC::MarkedVector<Value> right(vm.heap());
+    GC::RootVector<Value> left(vm.heap());
+    GC::RootVector<Value> right(vm.heap());
 
     left.ensure_capacity(arr_to_sort.size() / 2);
     right.ensure_capacity(arr_to_sort.size() / 2 + (arr_to_sort.size() & 1));

+ 1 - 1
Libraries/LibJS/Runtime/ArrayPrototype.h

@@ -64,6 +64,6 @@ private:
     JS_DECLARE_NATIVE_FUNCTION(with);
 };
 
-ThrowCompletionOr<void> array_merge_sort(VM&, Function<ThrowCompletionOr<double>(Value, Value)> const& compare_func, GC::MarkedVector<Value>& arr_to_sort);
+ThrowCompletionOr<void> array_merge_sort(VM&, Function<ThrowCompletionOr<double>(Value, Value)> const& compare_func, GC::RootVector<Value>& arr_to_sort);
 
 }

+ 1 - 1
Libraries/LibJS/Runtime/BoundFunction.cpp

@@ -83,7 +83,7 @@ ThrowCompletionOr<GC::Ref<Object>> BoundFunction::internal_construct(ReadonlySpa
     auto& bound_args = m_bound_arguments;
 
     // 4. Let args be the list-concatenation of boundArgs and argumentsList.
-    auto args = GC::MarkedVector<Value> { heap() };
+    auto args = GC::RootVector<Value> { heap() };
     args.extend(bound_args);
     args.append(arguments_list.data(), arguments_list.size());
 

+ 1 - 1
Libraries/LibJS/Runtime/FinalizationRegistry.cpp

@@ -79,7 +79,7 @@ ThrowCompletionOr<void> FinalizationRegistry::cleanup(GC::Ptr<JobCallback> callb
             continue;
 
         // b. Remove cell from finalizationRegistry.[[Cells]].
-        GC::MarkedVector<Value> arguments(vm.heap());
+        GC::RootVector<Value> arguments(vm.heap());
         arguments.append(it->held_value);
         it.remove(m_records);
 

+ 1 - 1
Libraries/LibJS/Runtime/FunctionPrototype.cpp

@@ -7,7 +7,7 @@
 #include <AK/Function.h>
 #include <AK/StringBuilder.h>
 #include <AK/TypeCasts.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/Runtime/AbstractOperations.h>
 #include <LibJS/Runtime/BoundFunction.h>
 #include <LibJS/Runtime/ECMAScriptFunctionObject.h>

+ 2 - 2
Libraries/LibJS/Runtime/GlobalObject.h

@@ -52,12 +52,12 @@ template<typename... Args>
 [[nodiscard]] ALWAYS_INLINE ThrowCompletionOr<Value> Value::invoke(VM& vm, PropertyKey const& property_key, Args... args)
 {
     if constexpr (sizeof...(Args) > 0) {
-        GC::MarkedVector<Value> arglist { vm.heap() };
+        GC::RootVector<Value> arglist { vm.heap() };
         (..., arglist.append(move(args)));
         return invoke_internal(vm, property_key, move(arglist));
     }
 
-    return invoke_internal(vm, property_key, Optional<GC::MarkedVector<Value>> {});
+    return invoke_internal(vm, property_key, Optional<GC::RootVector<Value>> {});
 }
 
 }

+ 1 - 1
Libraries/LibJS/Runtime/Intl/Intl.cpp

@@ -72,7 +72,7 @@ JS_DEFINE_NATIVE_FUNCTION(Intl::get_canonical_locales)
     // 1. Let ll be ? CanonicalizeLocaleList(locales).
     auto locale_list = TRY(canonicalize_locale_list(vm, locales));
 
-    GC::MarkedVector<Value> marked_locale_list { vm.heap() };
+    GC::RootVector<Value> marked_locale_list { vm.heap() };
     marked_locale_list.ensure_capacity(locale_list.size());
 
     for (auto& locale : locale_list)

+ 1 - 1
Libraries/LibJS/Runtime/Intl/PluralRulesPrototype.cpp

@@ -4,7 +4,7 @@
  * SPDX-License-Identifier: BSD-2-Clause
  */
 
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/Runtime/Array.h>
 #include <LibJS/Runtime/GlobalObject.h>
 #include <LibJS/Runtime/Intl/PluralRulesPrototype.h>

+ 2 - 2
Libraries/LibJS/Runtime/Iterator.cpp

@@ -345,10 +345,10 @@ GC::Ref<Object> create_iterator_result_object(VM& vm, Value value, bool done)
 }
 
 // 7.4.16 IteratorToList ( iteratorRecord ), https://tc39.es/ecma262/#sec-iteratortolist
-ThrowCompletionOr<GC::MarkedVector<Value>> iterator_to_list(VM& vm, IteratorRecord& iterator_record)
+ThrowCompletionOr<GC::RootVector<Value>> iterator_to_list(VM& vm, IteratorRecord& iterator_record)
 {
     // 1. Let values be a new empty List.
-    GC::MarkedVector<Value> values(vm.heap());
+    GC::RootVector<Value> values(vm.heap());
 
     // 2. Repeat,
     while (true) {

+ 1 - 1
Libraries/LibJS/Runtime/Iterator.h

@@ -82,7 +82,7 @@ ThrowCompletionOr<Optional<Value>> iterator_step_value(VM&, IteratorRecord&);
 Completion iterator_close(VM&, IteratorRecord const&, Completion);
 Completion async_iterator_close(VM&, IteratorRecord const&, Completion);
 GC::Ref<Object> create_iterator_result_object(VM&, Value, bool done);
-ThrowCompletionOr<GC::MarkedVector<Value>> iterator_to_list(VM&, IteratorRecord&);
+ThrowCompletionOr<GC::RootVector<Value>> iterator_to_list(VM&, IteratorRecord&);
 ThrowCompletionOr<void> setter_that_ignores_prototype_properties(VM&, Value this_, Object const& home, PropertyKey const& property, Value value);
 
 using IteratorValueCallback = Function<Optional<Completion>(Value)>;

+ 1 - 1
Libraries/LibJS/Runtime/IteratorPrototype.cpp

@@ -717,7 +717,7 @@ JS_DEFINE_NATIVE_FUNCTION(IteratorPrototype::to_array)
     auto iterated = TRY(get_iterator_direct(vm, object));
 
     // 4. Let items be a new empty List.
-    GC::MarkedVector<Value> items(realm.heap());
+    GC::RootVector<Value> items(realm.heap());
 
     // 5. Repeat,
     while (true) {

+ 1 - 1
Libraries/LibJS/Runtime/MapConstructor.cpp

@@ -94,7 +94,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapConstructor::group_by)
     };
 
     // 1. Let groups be ? GroupBy(items, callbackfn, zero).
-    auto groups = TRY((JS::group_by<OrderedHashMap<GC::Root<Value>, GC::MarkedVector<Value>, KeyedGroupTraits>, void>(vm, items, callback_function)));
+    auto groups = TRY((JS::group_by<OrderedHashMap<GC::Root<Value>, GC::RootVector<Value>, KeyedGroupTraits>, void>(vm, items, callback_function)));
 
     // 2. Let map be ! Construct(%Map%).
     auto map = Map::create(realm);

+ 2 - 2
Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp

@@ -210,11 +210,11 @@ ThrowCompletionOr<bool> ModuleNamespaceObject::internal_delete(PropertyKey const
 }
 
 // 10.4.6.11 [[OwnPropertyKeys]] ( ), https://tc39.es/ecma262/#sec-module-namespace-exotic-objects-ownpropertykeys
-ThrowCompletionOr<GC::MarkedVector<Value>> ModuleNamespaceObject::internal_own_property_keys() const
+ThrowCompletionOr<GC::RootVector<Value>> ModuleNamespaceObject::internal_own_property_keys() const
 {
     // 1. Let exports be O.[[Exports]].
     // NOTE: We only add the exports after we know the size of symbolKeys
-    GC::MarkedVector<Value> exports { vm().heap() };
+    GC::RootVector<Value> exports { vm().heap() };
 
     // 2. Let symbolKeys be OrdinaryOwnPropertyKeys(O).
     auto symbol_keys = MUST(Object::internal_own_property_keys());

+ 1 - 1
Libraries/LibJS/Runtime/ModuleNamespaceObject.h

@@ -29,7 +29,7 @@ public:
     virtual ThrowCompletionOr<Value> internal_get(PropertyKey const&, Value receiver, CacheablePropertyMetadata* = nullptr, PropertyLookupPhase = PropertyLookupPhase::OwnProperty) const override;
     virtual ThrowCompletionOr<bool> internal_set(PropertyKey const&, Value value, Value receiver, CacheablePropertyMetadata*) override;
     virtual ThrowCompletionOr<bool> internal_delete(PropertyKey const&) override;
-    virtual ThrowCompletionOr<GC::MarkedVector<Value>> internal_own_property_keys() const override;
+    virtual ThrowCompletionOr<GC::RootVector<Value>> internal_own_property_keys() const override;
     virtual void initialize(Realm&) override;
 
 private:

+ 4 - 4
Libraries/LibJS/Runtime/Object.cpp

@@ -371,7 +371,7 @@ ThrowCompletionOr<bool> Object::test_integrity_level(IntegrityLevel level) const
 }
 
 // 7.3.24 EnumerableOwnPropertyNames ( O, kind ), https://tc39.es/ecma262/#sec-enumerableownpropertynames
-ThrowCompletionOr<GC::MarkedVector<Value>> Object::enumerable_own_property_names(PropertyKind kind) const
+ThrowCompletionOr<GC::RootVector<Value>> Object::enumerable_own_property_names(PropertyKind kind) const
 {
     // NOTE: This has been flattened for readability, so some `else` branches in the
     //       spec text have been replaced with `continue`s in the loop below.
@@ -383,7 +383,7 @@ ThrowCompletionOr<GC::MarkedVector<Value>> Object::enumerable_own_property_names
     auto own_keys = TRY(internal_own_property_keys());
 
     // 2. Let properties be a new empty List.
-    auto properties = GC::MarkedVector<Value> { heap() };
+    auto properties = GC::RootVector<Value> { heap() };
 
     // 3. For each element key of ownKeys, do
     for (auto& key : own_keys) {
@@ -1070,12 +1070,12 @@ ThrowCompletionOr<bool> Object::internal_delete(PropertyKey const& property_key)
 }
 
 // 10.1.11 [[OwnPropertyKeys]] ( ), https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-ownpropertykeys
-ThrowCompletionOr<GC::MarkedVector<Value>> Object::internal_own_property_keys() const
+ThrowCompletionOr<GC::RootVector<Value>> Object::internal_own_property_keys() const
 {
     auto& vm = this->vm();
 
     // 1. Let keys be a new empty List.
-    GC::MarkedVector<Value> keys { heap() };
+    GC::RootVector<Value> keys { heap() };
 
     // 2. For each own property key P of O such that P is an array index, in ascending numeric index order, do
     for (auto& entry : m_indexed_properties) {

+ 3 - 3
Libraries/LibJS/Runtime/Object.h

@@ -10,7 +10,7 @@
 #include <AK/Badge.h>
 #include <AK/StringView.h>
 #include <LibGC/CellAllocator.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/Forward.h>
 #include <LibJS/Heap/Cell.h>
 #include <LibJS/Runtime/Completion.h>
@@ -118,7 +118,7 @@ public:
     ThrowCompletionOr<bool> has_own_property(PropertyKey const&) const;
     ThrowCompletionOr<bool> set_integrity_level(IntegrityLevel);
     ThrowCompletionOr<bool> test_integrity_level(IntegrityLevel) const;
-    ThrowCompletionOr<GC::MarkedVector<Value>> enumerable_own_property_names(PropertyKind kind) const;
+    ThrowCompletionOr<GC::RootVector<Value>> enumerable_own_property_names(PropertyKind kind) const;
     ThrowCompletionOr<void> copy_data_properties(VM&, Value source, HashTable<PropertyKey> const& excluded_keys, HashTable<JS::Value> const& excluded_values = {});
     ThrowCompletionOr<GC::Ref<Object>> snapshot_own_properties(VM&, GC::Ptr<Object> prototype, HashTable<PropertyKey> const& excluded_keys = {}, HashTable<Value> const& excluded_values = {});
 
@@ -146,7 +146,7 @@ public:
     virtual ThrowCompletionOr<Value> internal_get(PropertyKey const&, Value receiver, CacheablePropertyMetadata* = nullptr, PropertyLookupPhase = PropertyLookupPhase::OwnProperty) const;
     virtual ThrowCompletionOr<bool> internal_set(PropertyKey const&, Value value, Value receiver, CacheablePropertyMetadata* = nullptr);
     virtual ThrowCompletionOr<bool> internal_delete(PropertyKey const&);
-    virtual ThrowCompletionOr<GC::MarkedVector<Value>> internal_own_property_keys() const;
+    virtual ThrowCompletionOr<GC::RootVector<Value>> internal_own_property_keys() const;
 
     // NOTE: Any subclass of Object that overrides property access slots ([[Get]], [[Set]] etc)
     //       to customize access to indexed properties (properties where the name is a positive integer)

+ 3 - 3
Libraries/LibJS/Runtime/ObjectConstructor.cpp

@@ -93,7 +93,7 @@ enum class GetOwnPropertyKeysType {
 };
 
 // 20.1.2.11.1 GetOwnPropertyKeys ( O, type ), https://tc39.es/ecma262/#sec-getownpropertykeys
-static ThrowCompletionOr<GC::MarkedVector<Value>> get_own_property_keys(VM& vm, Value value, GetOwnPropertyKeysType type)
+static ThrowCompletionOr<GC::RootVector<Value>> get_own_property_keys(VM& vm, Value value, GetOwnPropertyKeysType type)
 {
     // 1. Let obj be ? ToObject(O).
     auto object = TRY(value.to_object(vm));
@@ -102,7 +102,7 @@ static ThrowCompletionOr<GC::MarkedVector<Value>> get_own_property_keys(VM& vm,
     auto keys = TRY(object->internal_own_property_keys());
 
     // 3. Let nameList be a new empty List.
-    auto name_list = GC::MarkedVector<Value> { vm.heap() };
+    auto name_list = GC::RootVector<Value> { vm.heap() };
 
     // 4. For each element nextKey of keys, do
     for (auto& next_key : keys) {
@@ -382,7 +382,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::group_by)
     auto callback_function = vm.argument(1);
 
     // 1. Let groups be ? GroupBy(items, callbackfn, property).
-    auto groups = TRY((JS::group_by<OrderedHashMap<PropertyKey, GC::MarkedVector<Value>>, PropertyKey>(vm, items, callback_function)));
+    auto groups = TRY((JS::group_by<OrderedHashMap<PropertyKey, GC::RootVector<Value>>, PropertyKey>(vm, items, callback_function)));
 
     // 2. Let obj be OrdinaryObjectCreate(null).
     auto object = Object::create(realm, nullptr);

+ 4 - 4
Libraries/LibJS/Runtime/ProxyObject.cpp

@@ -681,7 +681,7 @@ ThrowCompletionOr<bool> ProxyObject::internal_delete(PropertyKey const& property
 }
 
 // 10.5.11 [[OwnPropertyKeys]] ( ), https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
-ThrowCompletionOr<GC::MarkedVector<Value>> ProxyObject::internal_own_property_keys() const
+ThrowCompletionOr<GC::RootVector<Value>> ProxyObject::internal_own_property_keys() const
 {
     LIMIT_PROXY_RECURSION_DEPTH();
 
@@ -732,10 +732,10 @@ ThrowCompletionOr<GC::MarkedVector<Value>> ProxyObject::internal_own_property_ke
     // 13. Assert: targetKeys contains no duplicate entries.
 
     // 14. Let targetConfigurableKeys be a new empty List.
-    auto target_configurable_keys = GC::MarkedVector<Value> { heap() };
+    auto target_configurable_keys = GC::RootVector<Value> { heap() };
 
     // 15. Let targetNonconfigurableKeys be a new empty List.
-    auto target_nonconfigurable_keys = GC::MarkedVector<Value> { heap() };
+    auto target_nonconfigurable_keys = GC::RootVector<Value> { heap() };
 
     // 16. For each element key of targetKeys, do
     for (auto& key : target_keys) {
@@ -763,7 +763,7 @@ ThrowCompletionOr<GC::MarkedVector<Value>> ProxyObject::internal_own_property_ke
     }
 
     // 18. Let uncheckedResultKeys be a List whose elements are the elements of trapResult.
-    auto unchecked_result_keys = GC::MarkedVector<Value> { heap() };
+    auto unchecked_result_keys = GC::RootVector<Value> { heap() };
     unchecked_result_keys.extend(trap_result);
 
     // 19. For each element key of targetNonconfigurableKeys, do

+ 1 - 1
Libraries/LibJS/Runtime/ProxyObject.h

@@ -42,7 +42,7 @@ public:
     virtual ThrowCompletionOr<Value> internal_get(PropertyKey const&, Value receiver, CacheablePropertyMetadata*, PropertyLookupPhase) const override;
     virtual ThrowCompletionOr<bool> internal_set(PropertyKey const&, Value value, Value receiver, CacheablePropertyMetadata*) override;
     virtual ThrowCompletionOr<bool> internal_delete(PropertyKey const&) override;
-    virtual ThrowCompletionOr<GC::MarkedVector<Value>> internal_own_property_keys() const override;
+    virtual ThrowCompletionOr<GC::RootVector<Value>> internal_own_property_keys() const override;
     virtual ThrowCompletionOr<Value> internal_call(Value this_argument, ReadonlySpan<Value> arguments_list) override;
     virtual ThrowCompletionOr<GC::Ref<Object>> internal_construct(ReadonlySpan<Value> arguments_list, FunctionObject& new_target) override;
 

+ 3 - 3
Libraries/LibJS/Runtime/RegExpPrototype.cpp

@@ -669,7 +669,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
     }
 
     // 10. Let results be a new empty List.
-    GC::MarkedVector<Object*> results(vm.heap());
+    GC::RootVector<Object*> results(vm.heap());
 
     // 11. Let done be false.
     // 12. Repeat, while done is false,
@@ -735,7 +735,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
         position = clamp(position, static_cast<double>(0), static_cast<double>(string.length_in_code_units()));
 
         // g. Let captures be a new empty List.
-        GC::MarkedVector<Value> captures(vm.heap());
+        GC::RootVector<Value> captures(vm.heap());
 
         // h. Let n be 1.
         // i. Repeat, while n ≤ nCaptures,
@@ -764,7 +764,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
         // k. If functionalReplace is true, then
         if (replace_value.is_function()) {
             // i. Let replacerArgs be the list-concatenation of « matched », captures, and « 𝔽(position), S ».
-            GC::MarkedVector<Value> replacer_args(vm.heap());
+            GC::RootVector<Value> replacer_args(vm.heap());
             replacer_args.append(PrimitiveString::create(vm, move(matched)));
             replacer_args.extend(move(captures));
             replacer_args.append(Value(position));

+ 2 - 2
Libraries/LibJS/Runtime/StringObject.cpp

@@ -128,12 +128,12 @@ ThrowCompletionOr<bool> StringObject::internal_define_own_property(PropertyKey c
 }
 
 // 10.4.3.3 [[OwnPropertyKeys]] ( ), https://tc39.es/ecma262/#sec-string-exotic-objects-ownpropertykeys
-ThrowCompletionOr<GC::MarkedVector<Value>> StringObject::internal_own_property_keys() const
+ThrowCompletionOr<GC::RootVector<Value>> StringObject::internal_own_property_keys() const
 {
     auto& vm = this->vm();
 
     // 1. Let keys be a new empty List.
-    auto keys = GC::MarkedVector<Value> { heap() };
+    auto keys = GC::RootVector<Value> { heap() };
 
     // 2. Let str be O.[[StringData]].
     auto str = m_string->utf16_string_view();

+ 1 - 1
Libraries/LibJS/Runtime/StringObject.h

@@ -29,7 +29,7 @@ protected:
 private:
     virtual ThrowCompletionOr<Optional<PropertyDescriptor>> internal_get_own_property(PropertyKey const&) const override;
     virtual ThrowCompletionOr<bool> internal_define_own_property(PropertyKey const&, PropertyDescriptor const&, Optional<PropertyDescriptor>* precomputed_get_own_property = nullptr) override;
-    virtual ThrowCompletionOr<GC::MarkedVector<Value>> internal_own_property_keys() const override;
+    virtual ThrowCompletionOr<GC::RootVector<Value>> internal_own_property_keys() const override;
 
     virtual bool is_string_object() const final { return true; }
     virtual void visit_edges(Visitor&) override;

+ 3 - 3
Libraries/LibJS/Runtime/TypedArray.cpp

@@ -288,7 +288,7 @@ static ThrowCompletionOr<void> initialize_typed_array_from_array_like(VM& vm, Ty
 
 // 23.2.5.1.4 InitializeTypedArrayFromList, https://tc39.es/ecma262/#sec-initializetypedarrayfromlist
 template<typename T>
-static ThrowCompletionOr<void> initialize_typed_array_from_list(VM& vm, TypedArray<T>& typed_array, GC::MarkedVector<Value> const& list)
+static ThrowCompletionOr<void> initialize_typed_array_from_list(VM& vm, TypedArray<T>& typed_array, GC::RootVector<Value> const& list)
 {
     // 1. Let len be the number of elements in values.
     auto length = list.size();
@@ -315,7 +315,7 @@ static ThrowCompletionOr<void> initialize_typed_array_from_list(VM& vm, TypedArr
 }
 
 // 23.2.4.2 TypedArrayCreate ( constructor, argumentList ), https://tc39.es/ecma262/#typedarray-create
-ThrowCompletionOr<TypedArrayBase*> typed_array_create(VM& vm, FunctionObject& constructor, GC::MarkedVector<Value> arguments)
+ThrowCompletionOr<TypedArrayBase*> typed_array_create(VM& vm, FunctionObject& constructor, GC::RootVector<Value> arguments)
 {
     Optional<double> first_argument;
     if (arguments.size() == 1 && arguments[0].is_number())
@@ -346,7 +346,7 @@ ThrowCompletionOr<TypedArrayBase*> typed_array_create(VM& vm, FunctionObject& co
 }
 
 // 23.2.4.3 TypedArrayCreateSameType ( exemplar, argumentList ), https://tc39.es/ecma262/#sec-typedarray-create-same-type
-ThrowCompletionOr<TypedArrayBase*> typed_array_create_same_type(VM& vm, TypedArrayBase const& exemplar, GC::MarkedVector<Value> arguments)
+ThrowCompletionOr<TypedArrayBase*> typed_array_create_same_type(VM& vm, TypedArrayBase const& exemplar, GC::RootVector<Value> arguments)
 {
     auto& realm = *vm.current_realm();
 

+ 4 - 4
Libraries/LibJS/Runtime/TypedArray.h

@@ -413,7 +413,7 @@ public:
     }
 
     // 10.4.5.8 [[OwnPropertyKeys]] ( ), https://tc39.es/ecma262/#sec-integer-indexed-exotic-objects-ownpropertykeys
-    virtual ThrowCompletionOr<GC::MarkedVector<Value>> internal_own_property_keys() const override
+    virtual ThrowCompletionOr<GC::RootVector<Value>> internal_own_property_keys() const override
     {
         auto& vm = this->vm();
 
@@ -421,7 +421,7 @@ public:
         auto typed_array_record = make_typed_array_with_buffer_witness_record(*this, ArrayBuffer::Order::SeqCst);
 
         // 2. Let keys be a new empty List.
-        auto keys = GC::MarkedVector<Value> { heap() };
+        auto keys = GC::RootVector<Value> { heap() };
 
         // 3. If IsTypedArrayOutOfBounds(taRecord) is false, then
         if (!is_typed_array_out_of_bounds(typed_array_record)) {
@@ -511,8 +511,8 @@ protected:
 };
 
 ThrowCompletionOr<TypedArrayBase*> typed_array_from(VM&, Value);
-ThrowCompletionOr<TypedArrayBase*> typed_array_create(VM&, FunctionObject& constructor, GC::MarkedVector<Value> arguments);
-ThrowCompletionOr<TypedArrayBase*> typed_array_create_same_type(VM&, TypedArrayBase const& exemplar, GC::MarkedVector<Value> arguments);
+ThrowCompletionOr<TypedArrayBase*> typed_array_create(VM&, FunctionObject& constructor, GC::RootVector<Value> arguments);
+ThrowCompletionOr<TypedArrayBase*> typed_array_create_same_type(VM&, TypedArrayBase const& exemplar, GC::RootVector<Value> arguments);
 ThrowCompletionOr<TypedArrayWithBufferWitness> validate_typed_array(VM&, Object const&, ArrayBuffer::Order);
 ThrowCompletionOr<double> compare_typed_array_elements(VM&, Value x, Value y, FunctionObject* comparefn);
 

+ 3 - 3
Libraries/LibJS/Runtime/TypedArrayConstructor.cpp

@@ -92,7 +92,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::from)
         auto length = values.size();
 
         // c. Let targetObj be ? TypedArrayCreate(C, « 𝔽(len) »).
-        GC::MarkedVector<Value> arguments(vm.heap());
+        GC::RootVector<Value> arguments(vm.heap());
         arguments.empend(length);
         auto* target_object = TRY(typed_array_create(vm, constructor.as_function(), move(arguments)));
 
@@ -139,7 +139,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::from)
     auto length = TRY(length_of_array_like(vm, array_like));
 
     // 10. Let targetObj be ? TypedArrayCreate(C, « 𝔽(len) »).
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
     arguments.empend(length);
     auto* target_object = TRY(typed_array_create(vm, constructor.as_function(), move(arguments)));
 
@@ -188,7 +188,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::of)
         return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, constructor.to_string_without_side_effects());
 
     // 4. Let newObj be ? TypedArrayCreate(C, « 𝔽(len) »).
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
     arguments.append(Value(length));
     auto* new_object = TRY(typed_array_create(vm, constructor.as_function(), move(arguments)));
 

+ 9 - 9
Libraries/LibJS/Runtime/TypedArrayPrototype.cpp

@@ -92,7 +92,7 @@ static ThrowCompletionOr<GC::Ref<FunctionObject>> callback_from_args(VM& vm, Str
 }
 
 // 23.2.4.1 TypedArraySpeciesCreate ( exemplar, argumentList ), https://tc39.es/ecma262/#typedarray-species-create
-static ThrowCompletionOr<TypedArrayBase*> typed_array_species_create(VM& vm, TypedArrayBase const& exemplar, GC::MarkedVector<Value> arguments)
+static ThrowCompletionOr<TypedArrayBase*> typed_array_species_create(VM& vm, TypedArrayBase const& exemplar, GC::RootVector<Value> arguments)
 {
     auto& realm = *vm.current_realm();
 
@@ -634,7 +634,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::filter)
     auto callback_function = TRY(callback_from_args(vm, "filter"sv));
 
     // 5. Let kept be a new empty List.
-    GC::MarkedVector<Value> kept { vm.heap() };
+    GC::RootVector<Value> kept { vm.heap() };
 
     // 6. Let captured be 0.
     size_t captured = 0;
@@ -664,7 +664,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::filter)
     }
 
     // 9. Let A be ? TypedArraySpeciesCreate(O, « 𝔽(captured) »).
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
     arguments.empend(captured);
     auto* filter_array = TRY(typed_array_species_create(vm, *typed_array, move(arguments)));
 
@@ -1186,7 +1186,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::map)
     auto callback_function = TRY(callback_from_args(vm, "map"sv));
 
     // 5. Let A be ? TypedArraySpeciesCreate(O, « 𝔽(len) »).
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
     arguments.empend(length);
     auto* array = TRY(typed_array_species_create(vm, *typed_array, move(arguments)));
 
@@ -1660,7 +1660,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::slice)
     auto count = max(final - k, 0);
 
     // 13. Let A be ? TypedArraySpeciesCreate(O, « 𝔽(count) »).
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
     arguments.empend(count);
     auto* array = TRY(typed_array_species_create(vm, *typed_array, move(arguments)));
 
@@ -1905,7 +1905,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::subarray)
         return typed_array;
     }
 
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
 
     // 15. If O.[[ArrayLength]] is auto and end is undefined, then
     if (typed_array->array_length().is_auto() && end.is_undefined()) {
@@ -2013,7 +2013,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::to_reversed)
     auto length = typed_array_length(typed_array_record);
 
     // 4. Let A be ? TypedArrayCreateSameType(O, « 𝔽(length) »).
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
     arguments.empend(length);
     auto* array = TRY(typed_array_create_same_type(vm, *typed_array, move(arguments)));
 
@@ -2058,7 +2058,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::to_sorted)
     auto length = typed_array_length(typed_array_record);
 
     // 5. Let A be ? TypedArrayCreateSameType(O, « 𝔽(len) »).
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
     arguments.empend(length);
     auto* array = TRY(typed_array_create_same_type(vm, *typed_array, move(arguments)));
 
@@ -2138,7 +2138,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::with)
         return vm.throw_completion<RangeError>(ErrorType::TypedArrayInvalidIntegerIndex, actual_index);
 
     // 10. Let A be ? TypedArrayCreateSameType(O, « 𝔽(len) »).
-    GC::MarkedVector<Value> arguments(vm.heap());
+    GC::RootVector<Value> arguments(vm.heap());
     arguments.empend(length);
     auto* array = TRY(typed_array_create_same_type(vm, *typed_array, move(arguments)));
 

+ 1 - 1
Libraries/LibJS/Runtime/VM.h

@@ -18,7 +18,7 @@
 #include <LibCrypto/Forward.h>
 #include <LibGC/Function.h>
 #include <LibGC/Heap.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/CyclicModule.h>
 #include <LibJS/ModuleLoading.h>
 #include <LibJS/Runtime/CommonPropertyNames.h>

+ 1 - 1
Libraries/LibJS/Runtime/Value.cpp

@@ -2493,7 +2493,7 @@ ThrowCompletionOr<TriState> is_less_than(VM& vm, Value lhs, Value rhs, bool left
 }
 
 // 7.3.21 Invoke ( V, P [ , argumentsList ] ), https://tc39.es/ecma262/#sec-invoke
-ThrowCompletionOr<Value> Value::invoke_internal(VM& vm, PropertyKey const& property_key, Optional<GC::MarkedVector<Value>> arguments)
+ThrowCompletionOr<Value> Value::invoke_internal(VM& vm, PropertyKey const& property_key, Optional<GC::RootVector<Value>> arguments)
 {
     // 1. If argumentsList is not present, set argumentsList to a new empty List.
 

+ 1 - 1
Libraries/LibJS/Runtime/Value.h

@@ -449,7 +449,7 @@ private:
         }
     }
 
-    [[nodiscard]] ThrowCompletionOr<Value> invoke_internal(VM&, PropertyKey const&, Optional<GC::MarkedVector<Value>> arguments);
+    [[nodiscard]] ThrowCompletionOr<Value> invoke_internal(VM&, PropertyKey const&, Optional<GC::RootVector<Value>> arguments);
 
     ThrowCompletionOr<i32> to_i32_slow_case(VM&) const;
 

+ 1 - 1
Libraries/LibJS/Runtime/WrappedFunction.cpp

@@ -99,7 +99,7 @@ ThrowCompletionOr<Value> ordinary_wrapped_function_call(WrappedFunction const& f
     auto* target_realm = TRY(get_function_realm(vm, target));
 
     // 6. Let wrappedArgs be a new empty List.
-    auto wrapped_args = GC::MarkedVector<Value> { vm.heap() };
+    auto wrapped_args = GC::RootVector<Value> { vm.heap() };
     wrapped_args.ensure_capacity(arguments_list.size());
 
     // 7. For each element arg of argumentsList, do

+ 2 - 2
Libraries/LibWeb/Animations/KeyframeEffect.cpp

@@ -797,7 +797,7 @@ Optional<CSS::Selector::PseudoElement::Type> KeyframeEffect::pseudo_element_type
 }
 
 // https://www.w3.org/TR/web-animations-1/#dom-keyframeeffect-getkeyframes
-WebIDL::ExceptionOr<GC::MarkedVector<JS::Object*>> KeyframeEffect::get_keyframes()
+WebIDL::ExceptionOr<GC::RootVector<JS::Object*>> KeyframeEffect::get_keyframes()
 {
     if (m_keyframe_objects.size() != m_keyframes.size()) {
         auto& vm = this->vm();
@@ -832,7 +832,7 @@ WebIDL::ExceptionOr<GC::MarkedVector<JS::Object*>> KeyframeEffect::get_keyframes
         }
     }
 
-    GC::MarkedVector<JS::Object*> keyframes { heap() };
+    GC::RootVector<JS::Object*> keyframes { heap() };
     for (auto const& keyframe : m_keyframe_objects)
         keyframes.append(keyframe);
     return keyframes;

+ 1 - 1
Libraries/LibWeb/Animations/KeyframeEffect.h

@@ -97,7 +97,7 @@ public:
     Bindings::CompositeOperation composite() const { return m_composite; }
     void set_composite(Bindings::CompositeOperation value) { m_composite = value; }
 
-    WebIDL::ExceptionOr<GC::MarkedVector<JS::Object*>> get_keyframes();
+    WebIDL::ExceptionOr<GC::RootVector<JS::Object*>> get_keyframes();
     WebIDL::ExceptionOr<void> set_keyframes(Optional<GC::Root<JS::Object>> const&);
 
     KeyFrameSet const* key_frame_set() { return m_key_frame_set; }

+ 1 - 1
Libraries/LibWeb/Bindings/MainThreadVM.cpp

@@ -709,7 +709,7 @@ void queue_mutation_observer_microtask(DOM::Document const& document)
         custom_data.mutation_observer_microtask_queued = false;
 
         // 2. Let notifySet be a clone of the surrounding agent’s mutation observers.
-        GC::MarkedVector<DOM::MutationObserver*> notify_set(heap);
+        GC::RootVector<DOM::MutationObserver*> notify_set(heap);
         for (auto& observer : custom_data.mutation_observers)
             notify_set.append(observer);
 

+ 2 - 2
Libraries/LibWeb/Bindings/PlatformObject.cpp

@@ -400,7 +400,7 @@ JS::ThrowCompletionOr<bool> PlatformObject::internal_prevent_extensions()
 }
 
 // https://webidl.spec.whatwg.org/#legacy-platform-object-ownpropertykeys
-JS::ThrowCompletionOr<GC::MarkedVector<JS::Value>> PlatformObject::internal_own_property_keys() const
+JS::ThrowCompletionOr<GC::RootVector<JS::Value>> PlatformObject::internal_own_property_keys() const
 {
     if (!m_legacy_platform_object_flags.has_value() || m_legacy_platform_object_flags->has_global_interface_extended_attribute)
         return Base::internal_own_property_keys();
@@ -408,7 +408,7 @@ JS::ThrowCompletionOr<GC::MarkedVector<JS::Value>> PlatformObject::internal_own_
     auto& vm = this->vm();
 
     // 1. Let keys be a new empty list of ECMAScript String and Symbol values.
-    GC::MarkedVector<JS::Value> keys { heap() };
+    GC::RootVector<JS::Value> keys { heap() };
 
     // 2. If O supports indexed properties, then for each index of O’s supported property indices, in ascending numerical order, append ! ToString(index) to keys.
     if (m_legacy_platform_object_flags->supports_indexed_properties) {

+ 1 - 1
Libraries/LibWeb/Bindings/PlatformObject.h

@@ -40,7 +40,7 @@ public:
     virtual JS::ThrowCompletionOr<bool> internal_define_own_property(JS::PropertyKey const&, JS::PropertyDescriptor const&, Optional<JS::PropertyDescriptor>* precomputed_get_own_property = nullptr) override;
     virtual JS::ThrowCompletionOr<bool> internal_delete(JS::PropertyKey const&) override;
     virtual JS::ThrowCompletionOr<bool> internal_prevent_extensions() override;
-    virtual JS::ThrowCompletionOr<GC::MarkedVector<JS::Value>> internal_own_property_keys() const override;
+    virtual JS::ThrowCompletionOr<GC::RootVector<JS::Value>> internal_own_property_keys() const override;
 
     JS::ThrowCompletionOr<bool> is_named_property_exposed_on_object(JS::PropertyKey const&) const;
 

+ 1 - 1
Libraries/LibWeb/CSS/CSSRuleList.cpp

@@ -21,7 +21,7 @@ namespace Web::CSS {
 
 GC_DEFINE_ALLOCATOR(CSSRuleList);
 
-GC::Ref<CSSRuleList> CSSRuleList::create(JS::Realm& realm, GC::MarkedVector<CSSRule*> const& rules)
+GC::Ref<CSSRuleList> CSSRuleList::create(JS::Realm& realm, GC::RootVector<CSSRule*> const& rules)
 {
     auto rule_list = realm.create<CSSRuleList>(realm);
     for (auto* rule : rules)

+ 1 - 1
Libraries/LibWeb/CSS/CSSRuleList.h

@@ -25,7 +25,7 @@ class CSSRuleList : public Bindings::PlatformObject {
     GC_DECLARE_ALLOCATOR(CSSRuleList);
 
 public:
-    [[nodiscard]] static GC::Ref<CSSRuleList> create(JS::Realm&, GC::MarkedVector<CSSRule*> const&);
+    [[nodiscard]] static GC::Ref<CSSRuleList> create(JS::Realm&, GC::RootVector<CSSRule*> const&);
     [[nodiscard]] static GC::Ref<CSSRuleList> create_empty(JS::Realm&);
 
     ~CSSRuleList() = default;

+ 2 - 2
Libraries/LibWeb/CSS/CSSStyleSheet.cpp

@@ -218,7 +218,7 @@ GC::Ref<WebIDL::Promise> CSSStyleSheet::replace(String text)
         auto& rules = parsed_stylesheet->rules();
 
         // 2. If rules contains one or more @import rules, remove those rules from rules.
-        GC::MarkedVector<GC::Ref<CSSRule>> rules_without_import(realm.heap());
+        GC::RootVector<GC::Ref<CSSRule>> rules_without_import(realm.heap());
         for (auto rule : rules) {
             if (rule->type() != CSSRule::Type::Import)
                 rules_without_import.append(rule);
@@ -252,7 +252,7 @@ WebIDL::ExceptionOr<void> CSSStyleSheet::replace_sync(StringView text)
     auto& rules = parsed_stylesheet->rules();
 
     // 3. If rules contains one or more @import rules, remove those rules from rules.
-    GC::MarkedVector<GC::Ref<CSSRule>> rules_without_import(realm().heap());
+    GC::RootVector<GC::Ref<CSSRule>> rules_without_import(realm().heap());
     for (auto rule : rules) {
         if (rule->type() != CSSRule::Type::Import)
             rules_without_import.append(rule);

+ 1 - 1
Libraries/LibWeb/CSS/FontFaceSet.cpp

@@ -249,7 +249,7 @@ JS::ThrowCompletionOr<GC::Ref<WebIDL::Promise>> FontFaceSet::load(String const&
 
         // 4. Queue a task to run the following steps synchronously:
         HTML::queue_a_task(HTML::Task::Source::FontLoading, nullptr, nullptr, GC::create_function(realm.heap(), [&realm, promise, matched_font_faces] {
-            GC::MarkedVector<GC::Ref<WebIDL::Promise>> promises(realm.heap());
+            GC::RootVector<GC::Ref<WebIDL::Promise>> promises(realm.heap());
 
             // 1. For all of the font faces in the font face list, call their load() method.
             for (auto font_face_value : *matched_font_faces) {

+ 1 - 1
Libraries/LibWeb/CSS/Parser/MediaParsing.cpp

@@ -624,7 +624,7 @@ GC::Ptr<CSSMediaRule> Parser::convert_to_media_rule(AtRule const& rule, Nested n
     auto media_query_list = parse_a_media_query_list(media_query_tokens);
     auto media_list = MediaList::create(m_context.realm(), move(media_query_list));
 
-    GC::MarkedVector<CSSRule*> child_rules { m_context.realm().heap() };
+    GC::RootVector<CSSRule*> child_rules { m_context.realm().heap() };
     for (auto const& child : rule.child_rules_and_lists_of_declarations) {
         child.visit(
             [&](Rule const& rule) {

+ 1 - 1
Libraries/LibWeb/CSS/Parser/Parser.cpp

@@ -158,7 +158,7 @@ CSSStyleSheet* Parser::parse_as_css_stylesheet(Optional<URL::URL> location)
     auto const& style_sheet = parse_a_stylesheet(m_token_stream, {});
 
     // Interpret all of the resulting top-level qualified rules as style rules, defined below.
-    GC::MarkedVector<CSSRule*> rules(m_context.realm().heap());
+    GC::RootVector<CSSRule*> rules(m_context.realm().heap());
     for (auto const& raw_rule : style_sheet.rules) {
         auto rule = convert_to_rule(raw_rule, Nested::No);
         // If any style rule is invalid, or any at-rule is not recognized or is invalid according to its grammar or context, it’s a parse error.

+ 4 - 4
Libraries/LibWeb/CSS/Parser/RuleParsing.cpp

@@ -107,7 +107,7 @@ GC::Ptr<CSSStyleRule> Parser::convert_to_style_rule(QualifiedRule const& qualifi
         return {};
     }
 
-    GC::MarkedVector<CSSRule*> child_rules { m_context.realm().heap() };
+    GC::RootVector<CSSRule*> child_rules { m_context.realm().heap() };
     for (auto& child : qualified_rule.child_rules) {
         child.visit(
             [&](Rule const& rule) {
@@ -246,7 +246,7 @@ GC::Ptr<CSSRule> Parser::convert_to_layer_rule(AtRule const& rule, Nested nested
         }
 
         // Then the rules
-        GC::MarkedVector<CSSRule*> child_rules { m_context.realm().heap() };
+        GC::RootVector<CSSRule*> child_rules { m_context.realm().heap() };
         for (auto const& child : rule.child_rules_and_lists_of_declarations) {
             child.visit(
                 [&](Rule const& rule) {
@@ -341,7 +341,7 @@ GC::Ptr<CSSKeyframesRule> Parser::convert_to_keyframes_rule(AtRule const& rule)
 
     auto name = name_token.to_string();
 
-    GC::MarkedVector<CSSRule*> keyframes(m_context.realm().heap());
+    GC::RootVector<CSSRule*> keyframes(m_context.realm().heap());
     rule.for_each_as_qualified_rule_list([&](auto& qualified_rule) {
         if (!qualified_rule.child_rules.is_empty()) {
             dbgln_if(CSS_PARSER_DEBUG, "CSSParser: @keyframes keyframe rule contains at-rules; discarding them.");
@@ -468,7 +468,7 @@ GC::Ptr<CSSSupportsRule> Parser::convert_to_supports_rule(AtRule const& rule, Ne
         return {};
     }
 
-    GC::MarkedVector<CSSRule*> child_rules { m_context.realm().heap() };
+    GC::RootVector<CSSRule*> child_rules { m_context.realm().heap() };
     for (auto const& child : rule.child_rules_and_lists_of_declarations) {
         child.visit(
             [&](Rule const& rule) {

+ 1 - 1
Libraries/LibWeb/DOM/Attr.cpp

@@ -106,7 +106,7 @@ void Attr::handle_attribute_changes(Element& element, Optional<String> const& ol
     if (element.is_custom()) {
         auto& vm = this->vm();
 
-        GC::MarkedVector<JS::Value> arguments { vm.heap() };
+        GC::RootVector<JS::Value> arguments { vm.heap() };
         arguments.append(JS::PrimitiveString::create(vm, local_name()));
         arguments.append(!old_value.has_value() ? JS::js_null() : JS::PrimitiveString::create(vm, old_value.value()));
         arguments.append(!new_value.has_value() ? JS::js_null() : JS::PrimitiveString::create(vm, new_value.value()));

+ 7 - 7
Libraries/LibWeb/DOM/Document.cpp

@@ -15,7 +15,7 @@
 #include <AK/StringBuilder.h>
 #include <AK/Utf8View.h>
 #include <LibCore/Timer.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/Runtime/Array.h>
 #include <LibJS/Runtime/FunctionObject.h>
 #include <LibJS/Runtime/NativeFunction.h>
@@ -1973,7 +1973,7 @@ void Document::adopt_node(Node& node)
             if (element.is_custom()) {
                 auto& vm = this->vm();
 
-                GC::MarkedVector<JS::Value> arguments { vm.heap() };
+                GC::RootVector<JS::Value> arguments { vm.heap() };
                 arguments.append(&old_document);
                 arguments.append(this);
 
@@ -4208,7 +4208,7 @@ void Document::run_the_update_intersection_observations_steps(HighResolutionTime
     // 2. For each observer in observer list:
 
     // NOTE: We make a copy of the intersection observers list to avoid modifying it while iterating.
-    GC::MarkedVector<GC::Ref<IntersectionObserver::IntersectionObserver>> intersection_observers(heap());
+    GC::RootVector<GC::Ref<IntersectionObserver::IntersectionObserver>> intersection_observers(heap());
     intersection_observers.ensure_capacity(m_intersection_observers.size());
     for (auto& observer : m_intersection_observers)
         intersection_observers.append(observer);
@@ -5058,10 +5058,10 @@ Element const* Document::element_from_point(double x, double y)
 }
 
 // https://drafts.csswg.org/cssom-view/#dom-document-elementsfrompoint
-GC::MarkedVector<GC::Ref<Element>> Document::elements_from_point(double x, double y)
+GC::RootVector<GC::Ref<Element>> Document::elements_from_point(double x, double y)
 {
     // 1. Let sequence be a new empty sequence.
-    GC::MarkedVector<GC::Ref<Element>> sequence(heap());
+    GC::RootVector<GC::Ref<Element>> sequence(heap());
 
     // 2. If either argument is negative, x is greater than the viewport width excluding the size of a rendered scroll bar (if any),
     //    or y is greater than the viewport height excluding the size of a rendered scroll bar (if any),
@@ -5288,7 +5288,7 @@ size_t Document::broadcast_active_resize_observations()
     // 2. For each observer in document.[[resizeObservers]] run these steps:
 
     // NOTE: We make a copy of the resize observers list to avoid modifying it while iterating.
-    GC::MarkedVector<GC::Ref<ResizeObserver::ResizeObserver>> resize_observers(heap());
+    GC::RootVector<GC::Ref<ResizeObserver::ResizeObserver>> resize_observers(heap());
     resize_observers.ensure_capacity(m_resize_observers.size());
     for (auto const& observer : m_resize_observers)
         resize_observers.append(observer);
@@ -5300,7 +5300,7 @@ size_t Document::broadcast_active_resize_observations()
         }
 
         // 2. Let entries be an empty list of ResizeObserverEntryies.
-        GC::MarkedVector<GC::Ref<ResizeObserver::ResizeObserverEntry>> entries(heap());
+        GC::RootVector<GC::Ref<ResizeObserver::ResizeObserverEntry>> entries(heap());
 
         // 3. For each observation in [[activeTargets]] perform these steps:
         for (auto const& observation : observer->active_targets()) {

+ 1 - 1
Libraries/LibWeb/DOM/Document.h

@@ -662,7 +662,7 @@ public:
     WebIDL::ExceptionOr<void> set_design_mode(String const&);
 
     Element const* element_from_point(double x, double y);
-    GC::MarkedVector<GC::Ref<Element>> elements_from_point(double x, double y);
+    GC::RootVector<GC::Ref<Element>> elements_from_point(double x, double y);
     GC::Ptr<Element const> scrolling_element() const;
 
     void set_needs_to_resolve_paint_only_properties() { m_needs_to_resolve_paint_only_properties = true; }

+ 3 - 3
Libraries/LibWeb/DOM/Element.cpp

@@ -2107,7 +2107,7 @@ void Element::enqueue_a_custom_element_upgrade_reaction(HTML::CustomElementDefin
     enqueue_an_element_on_the_appropriate_element_queue();
 }
 
-void Element::enqueue_a_custom_element_callback_reaction(FlyString const& callback_name, GC::MarkedVector<JS::Value> arguments)
+void Element::enqueue_a_custom_element_callback_reaction(FlyString const& callback_name, GC::RootVector<JS::Value> arguments)
 {
     // 1. Let definition be element's custom element definition.
     auto& definition = m_custom_element_definition;
@@ -2164,7 +2164,7 @@ JS::ThrowCompletionOr<void> Element::upgrade_element(GC::Ref<HTML::CustomElement
         auto const* attribute = m_attributes->item(attribute_index);
         VERIFY(attribute);
 
-        GC::MarkedVector<JS::Value> arguments { vm.heap() };
+        GC::RootVector<JS::Value> arguments { vm.heap() };
 
         arguments.append(JS::PrimitiveString::create(vm, attribute->local_name()));
         arguments.append(JS::js_null());
@@ -2176,7 +2176,7 @@ JS::ThrowCompletionOr<void> Element::upgrade_element(GC::Ref<HTML::CustomElement
 
     // 5. If element is connected, then enqueue a custom element callback reaction with element, callback name "connectedCallback", and « ».
     if (is_connected()) {
-        GC::MarkedVector<JS::Value> empty_arguments { vm.heap() };
+        GC::RootVector<JS::Value> empty_arguments { vm.heap() };
         enqueue_a_custom_element_callback_reaction(HTML::CustomElementReactionNames::connectedCallback, move(empty_arguments));
     }
 

+ 2 - 2
Libraries/LibWeb/DOM/Element.h

@@ -72,7 +72,7 @@ struct CustomElementUpgradeReaction {
 // A callback reaction, which will call a lifecycle callback, and contains a callback function as well as a list of arguments.
 struct CustomElementCallbackReaction {
     GC::Root<WebIDL::CallbackType> callback;
-    GC::MarkedVector<JS::Value> arguments;
+    GC::RootVector<JS::Value> arguments;
 };
 
 // https://dom.spec.whatwg.org/#concept-element-custom-element-state
@@ -306,7 +306,7 @@ public:
     bool has_referenced_and_hidden_ancestor() const;
 
     void enqueue_a_custom_element_upgrade_reaction(HTML::CustomElementDefinition& custom_element_definition);
-    void enqueue_a_custom_element_callback_reaction(FlyString const& callback_name, GC::MarkedVector<JS::Value> arguments);
+    void enqueue_a_custom_element_callback_reaction(FlyString const& callback_name, GC::RootVector<JS::Value> arguments);
 
     using CustomElementReactionQueue = Vector<Variant<CustomElementUpgradeReaction, CustomElementCallbackReaction>>;
     CustomElementReactionQueue* custom_element_reaction_queue() { return m_custom_element_reaction_queue; }

+ 2 - 2
Libraries/LibWeb/DOM/HTMLCollection.cpp

@@ -98,10 +98,10 @@ void HTMLCollection::update_cache_if_needed() const
     m_cached_dom_tree_version = root()->document().dom_tree_version();
 }
 
-GC::MarkedVector<GC::Ref<Element>> HTMLCollection::collect_matching_elements() const
+GC::RootVector<GC::Ref<Element>> HTMLCollection::collect_matching_elements() const
 {
     update_cache_if_needed();
-    GC::MarkedVector<GC::Ref<Element>> elements(heap());
+    GC::RootVector<GC::Ref<Element>> elements(heap());
     for (auto& element : m_cached_elements)
         elements.append(element);
     return elements;

+ 1 - 1
Libraries/LibWeb/DOM/HTMLCollection.h

@@ -38,7 +38,7 @@ public:
     Element* item(size_t index) const;
     Element* named_item(FlyString const& key) const;
 
-    GC::MarkedVector<GC::Ref<Element>> collect_matching_elements() const;
+    GC::RootVector<GC::Ref<Element>> collect_matching_elements() const;
 
     virtual Optional<JS::Value> item_value(size_t index) const override;
     virtual JS::Value named_item_value(FlyString const& name) const override;

+ 2 - 2
Libraries/LibWeb/DOM/LiveNodeList.cpp

@@ -35,9 +35,9 @@ void LiveNodeList::visit_edges(Cell::Visitor& visitor)
     visitor.visit(m_root);
 }
 
-GC::MarkedVector<Node*> LiveNodeList::collection() const
+GC::RootVector<Node*> LiveNodeList::collection() const
 {
-    GC::MarkedVector<Node*> nodes(heap());
+    GC::RootVector<Node*> nodes(heap());
     if (m_scope == Scope::Descendants) {
         m_root->for_each_in_subtree([&](auto& node) {
             if (m_filter(node))

+ 1 - 1
Libraries/LibWeb/DOM/LiveNodeList.h

@@ -38,7 +38,7 @@ protected:
 private:
     virtual void visit_edges(Cell::Visitor&) override;
 
-    GC::MarkedVector<Node*> collection() const;
+    GC::RootVector<Node*> collection() const;
 
     GC::Ref<Node const> m_root;
     Function<bool(Node const&)> m_filter;

+ 4 - 4
Libraries/LibWeb/DOM/Node.cpp

@@ -673,7 +673,7 @@ void Node::insert_before(GC::Ref<Node> node, GC::Ptr<Node> child, bool suppress_
                 // 1. If inclusiveDescendant is custom, then enqueue a custom element callback reaction with inclusiveDescendant,
                 //    callback name "connectedCallback", and an empty argument list.
                 if (element.is_custom()) {
-                    GC::MarkedVector<JS::Value> empty_arguments { vm().heap() };
+                    GC::RootVector<JS::Value> empty_arguments { vm().heap() };
                     element.enqueue_a_custom_element_callback_reaction(HTML::CustomElementReactionNames::connectedCallback, move(empty_arguments));
                 }
 
@@ -702,7 +702,7 @@ void Node::insert_before(GC::Ref<Node> node, GC::Ptr<Node> child, bool suppress_
     //            the post-connection steps while we’re traversing the node tree. This is because the post-connection
     //            steps can modify the tree’s structure, making live traversal unsafe, possibly leading to the
     //            post-connection steps being called multiple times on the same node.
-    GC::MarkedVector<GC::Ref<Node>> static_node_list(heap());
+    GC::RootVector<GC::Ref<Node>> static_node_list(heap());
 
     // 11. For each node of nodes, in tree order:
     for (auto& node : nodes) {
@@ -882,7 +882,7 @@ void Node::remove(bool suppress_observers)
         auto& element = static_cast<DOM::Element&>(*this);
 
         if (element.is_custom() && is_parent_connected) {
-            GC::MarkedVector<JS::Value> empty_arguments { vm().heap() };
+            GC::RootVector<JS::Value> empty_arguments { vm().heap() };
             element.enqueue_a_custom_element_callback_reaction(HTML::CustomElementReactionNames::disconnectedCallback, move(empty_arguments));
         }
     }
@@ -898,7 +898,7 @@ void Node::remove(bool suppress_observers)
             auto& element = static_cast<DOM::Element&>(descendant);
 
             if (element.is_custom() && is_parent_connected) {
-                GC::MarkedVector<JS::Value> empty_arguments { vm().heap() };
+                GC::RootVector<JS::Value> empty_arguments { vm().heap() };
                 element.enqueue_a_custom_element_callback_reaction(HTML::CustomElementReactionNames::disconnectedCallback, move(empty_arguments));
             }
         }

+ 1 - 1
Libraries/LibWeb/DOM/Range.cpp

@@ -1105,7 +1105,7 @@ WebIDL::ExceptionOr<void> Range::delete_contents()
     }
 
     // 4. Let nodes to remove be a list of all the nodes that are contained in this, in tree order, omitting any node whose parent is also contained in this.
-    GC::MarkedVector<Node*> nodes_to_remove(heap());
+    GC::RootVector<Node*> nodes_to_remove(heap());
     for (GC::Ptr<Node> node = start_container(); node != end_container()->next_sibling(); node = node->next_in_pre_order()) {
         if (contains_node(*node) && (!node->parent_node() || !contains_node(*node->parent_node())))
             nodes_to_remove.append(node);

+ 1 - 1
Libraries/LibWeb/Fetch/Fetching/Fetching.cpp

@@ -1645,7 +1645,7 @@ WebIDL::ExceptionOr<GC::Ref<PendingResponse>> http_network_or_cache_fetch(JS::Re
 
     // 5. Let storedResponse be null.
     GC::Ptr<Infrastructure::Response> stored_response;
-    GC::MarkedVector<GC::Ptr<Infrastructure::Response>> initial_set_of_stored_responses(realm.heap());
+    GC::RootVector<GC::Ptr<Infrastructure::Response>> initial_set_of_stored_responses(realm.heap());
 
     // 6. Let httpCache be null.
     // (Typeless until we actually implement it, needed for checks below)

+ 1 - 1
Libraries/LibWeb/HTML/AudioTrackList.h

@@ -8,7 +8,7 @@
 
 #include <AK/Badge.h>
 #include <AK/String.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibWeb/DOM/EventTarget.h>
 #include <LibWeb/HTML/AudioTrack.h>
 

+ 1 - 1
Libraries/LibWeb/HTML/BroadcastChannel.cpp

@@ -121,7 +121,7 @@ WebIDL::ExceptionOr<void> BroadcastChannel::post_message(JS::Value message)
     auto source_storage_key = Web::StorageAPI::obtain_a_storage_key_for_non_storage_purposes(relevant_settings_object(*this));
 
     // 6. Let destinations be a list of BroadcastChannel objects that match the following criteria:
-    GC::MarkedVector<GC::Ref<BroadcastChannel>> destinations(vm.heap());
+    GC::RootVector<GC::Ref<BroadcastChannel>> destinations(vm.heap());
 
     // * The result of running obtain a storage key for non-storage purposes with their relevant settings object equals sourceStorageKey.
     auto same_origin_broadcast_channels = s_broadcast_channel_repository.registered_channels_for_key(source_storage_key);

+ 2 - 2
Libraries/LibWeb/HTML/CloseWatcherManager.cpp

@@ -31,7 +31,7 @@ void CloseWatcherManager::add(GC::Ref<CloseWatcher> close_watcher)
     // If manager's groups's size is less than manager's allowed number of groups
     if (m_groups.size() < m_allowed_number_of_groups) {
         // then append « closeWatcher » to manager's groups.
-        GC::MarkedVector<GC::Ref<CloseWatcher>> new_group(realm().heap());
+        GC::RootVector<GC::Ref<CloseWatcher>> new_group(realm().heap());
         new_group.append(close_watcher);
         m_groups.append(move(new_group));
     } else {
@@ -68,7 +68,7 @@ bool CloseWatcherManager::process_close_watchers()
         auto& group = m_groups.last();
         // Ambiguous spec wording. We copy the groups to avoid modifying the original while iterating.
         // See https://github.com/whatwg/html/issues/10240
-        GC::MarkedVector<GC::Ref<CloseWatcher>> group_copy(realm().heap());
+        GC::RootVector<GC::Ref<CloseWatcher>> group_copy(realm().heap());
         group_copy.ensure_capacity(group.size());
         for (auto& close_watcher : group) {
             group_copy.append(close_watcher);

+ 2 - 2
Libraries/LibWeb/HTML/CrossOrigin/AbstractOperations.cpp

@@ -237,13 +237,13 @@ JS::ThrowCompletionOr<bool> cross_origin_set(JS::VM& vm, JS::Object& object, JS:
 }
 
 // 7.2.3.7 CrossOriginOwnPropertyKeys ( O ), https://html.spec.whatwg.org/multipage/browsers.html#crossoriginownpropertykeys-(-o-)
-GC::MarkedVector<JS::Value> cross_origin_own_property_keys(Variant<HTML::Location const*, HTML::Window const*> const& object)
+GC::RootVector<JS::Value> cross_origin_own_property_keys(Variant<HTML::Location const*, HTML::Window const*> const& object)
 {
     auto& event_loop = HTML::main_thread_event_loop();
     auto& vm = event_loop.vm();
 
     // 1. Let keys be a new empty List.
-    auto keys = GC::MarkedVector<JS::Value> { vm.heap() };
+    auto keys = GC::RootVector<JS::Value> { vm.heap() };
 
     // 2. For each e of CrossOriginProperties(O), append e.[[Property]] to keys.
     for (auto& entry : cross_origin_properties(object))

+ 1 - 1
Libraries/LibWeb/HTML/CrossOrigin/AbstractOperations.h

@@ -21,6 +21,6 @@ bool is_platform_object_same_origin(JS::Object const&);
 Optional<JS::PropertyDescriptor> cross_origin_get_own_property_helper(Variant<HTML::Location*, HTML::Window*> const&, JS::PropertyKey const&);
 JS::ThrowCompletionOr<JS::Value> cross_origin_get(JS::VM&, JS::Object const&, JS::PropertyKey const&, JS::Value receiver);
 JS::ThrowCompletionOr<bool> cross_origin_set(JS::VM&, JS::Object&, JS::PropertyKey const&, JS::Value, JS::Value receiver);
-GC::MarkedVector<JS::Value> cross_origin_own_property_keys(Variant<HTML::Location const*, HTML::Window const*> const&);
+GC::RootVector<JS::Value> cross_origin_own_property_keys(Variant<HTML::Location const*, HTML::Window const*> const&);
 
 }

+ 3 - 3
Libraries/LibWeb/HTML/EventLoop/TaskQueue.cpp

@@ -4,7 +4,7 @@
  * SPDX-License-Identifier: BSD-2-Clause
  */
 
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/EventLoop/TaskQueue.h>
 
@@ -63,9 +63,9 @@ void TaskQueue::remove_tasks_matching(Function<bool(HTML::Task const&)> filter)
     });
 }
 
-GC::MarkedVector<GC::Ref<Task>> TaskQueue::take_tasks_matching(Function<bool(HTML::Task const&)> filter)
+GC::RootVector<GC::Ref<Task>> TaskQueue::take_tasks_matching(Function<bool(HTML::Task const&)> filter)
 {
-    GC::MarkedVector<GC::Ref<Task>> matching_tasks(heap());
+    GC::RootVector<GC::Ref<Task>> matching_tasks(heap());
 
     for (size_t i = 0; i < m_tasks.size();) {
         auto& task = m_tasks.at(i);

+ 1 - 1
Libraries/LibWeb/HTML/EventLoop/TaskQueue.h

@@ -37,7 +37,7 @@ public:
     }
 
     void remove_tasks_matching(Function<bool(HTML::Task const&)>);
-    GC::MarkedVector<GC::Ref<Task>> take_tasks_matching(Function<bool(HTML::Task const&)>);
+    GC::RootVector<GC::Ref<Task>> take_tasks_matching(Function<bool(HTML::Task const&)>);
 
     Task const* last_added_task() const;
 

+ 2 - 2
Libraries/LibWeb/HTML/HTMLAllCollection.cpp

@@ -84,9 +84,9 @@ static bool is_all_named_element(DOM::Element const& element)
         || is<HTML::HTMLTextAreaElement>(element);
 }
 
-GC::MarkedVector<GC::Ref<DOM::Element>> HTMLAllCollection::collect_matching_elements() const
+GC::RootVector<GC::Ref<DOM::Element>> HTMLAllCollection::collect_matching_elements() const
 {
-    GC::MarkedVector<GC::Ref<DOM::Element>> elements(m_root->heap());
+    GC::RootVector<GC::Ref<DOM::Element>> elements(m_root->heap());
     if (m_scope == Scope::Descendants) {
         m_root->for_each_in_subtree_of_type<DOM::Element>([&](auto& element) {
             if (m_filter(element))

+ 1 - 1
Libraries/LibWeb/HTML/HTMLAllCollection.h

@@ -32,7 +32,7 @@ public:
     Variant<GC::Ref<DOM::HTMLCollection>, GC::Ref<DOM::Element>, Empty> item(Optional<FlyString> const& name_or_index) const;
     Variant<GC::Ref<DOM::HTMLCollection>, GC::Ref<DOM::Element>, Empty> named_item(FlyString const& name) const;
 
-    GC::MarkedVector<GC::Ref<DOM::Element>> collect_matching_elements() const;
+    GC::RootVector<GC::Ref<DOM::Element>> collect_matching_elements() const;
 
     virtual Optional<JS::Value> item_value(size_t index) const override;
     virtual JS::Value named_item_value(FlyString const& name) const override;

+ 1 - 1
Libraries/LibWeb/HTML/HTMLImageElement.cpp

@@ -1037,7 +1037,7 @@ static void update_the_source_set(DOM::Element& element)
         TODO();
 
     // 2. Let elements be « el ».
-    GC::MarkedVector<DOM::Element*> elements(element.heap());
+    GC::RootVector<DOM::Element*> elements(element.heap());
     elements.append(&element);
 
     // 3. If el is an img element whose parent node is a picture element,

+ 2 - 2
Libraries/LibWeb/HTML/HTMLMediaElement.cpp

@@ -1863,12 +1863,12 @@ void HTMLMediaElement::time_marches_on(TimeMarchesOnReason reason)
 }
 
 // https://html.spec.whatwg.org/multipage/media.html#take-pending-play-promises
-GC::MarkedVector<GC::Ref<WebIDL::Promise>> HTMLMediaElement::take_pending_play_promises()
+GC::RootVector<GC::Ref<WebIDL::Promise>> HTMLMediaElement::take_pending_play_promises()
 {
     // 1. Let promises be an empty list of promises.
     // 2. Copy the media element's list of pending play promises to promises.
     // 3. Clear the media element's list of pending play promises.
-    GC::MarkedVector<GC::Ref<WebIDL::Promise>> promises(heap());
+    GC::RootVector<GC::Ref<WebIDL::Promise>> promises(heap());
     promises.extend(move(m_pending_play_promises));
 
     // 4. Return promises.

+ 2 - 2
Libraries/LibWeb/HTML/HTMLMediaElement.h

@@ -11,7 +11,7 @@
 #include <AK/Optional.h>
 #include <AK/Time.h>
 #include <AK/Variant.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibGfx/Rect.h>
 #include <LibWeb/DOM/DocumentLoadEventDelayer.h>
 #include <LibWeb/HTML/CORSSettingAttribute.h>
@@ -207,7 +207,7 @@ private:
     };
     void time_marches_on(TimeMarchesOnReason = TimeMarchesOnReason::NormalPlayback);
 
-    GC::MarkedVector<GC::Ref<WebIDL::Promise>> take_pending_play_promises();
+    GC::RootVector<GC::Ref<WebIDL::Promise>> take_pending_play_promises();
     void resolve_pending_play_promises(ReadonlySpan<GC::Ref<WebIDL::Promise>> promises);
     void reject_pending_play_promises(ReadonlySpan<GC::Ref<WebIDL::Promise>> promises, GC::Ref<WebIDL::DOMException> error);
 

+ 2 - 2
Libraries/LibWeb/HTML/Location.cpp

@@ -7,7 +7,7 @@
 
 #include <AK/String.h>
 #include <AK/StringBuilder.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/Runtime/Completion.h>
 #include <LibJS/Runtime/PropertyDescriptor.h>
 #include <LibJS/Runtime/PropertyKey.h>
@@ -596,7 +596,7 @@ JS::ThrowCompletionOr<bool> Location::internal_delete(JS::PropertyKey const& pro
 }
 
 // 7.10.5.10 [[OwnPropertyKeys]] ( ), https://html.spec.whatwg.org/multipage/history.html#location-ownpropertykeys
-JS::ThrowCompletionOr<GC::MarkedVector<JS::Value>> Location::internal_own_property_keys() const
+JS::ThrowCompletionOr<GC::RootVector<JS::Value>> Location::internal_own_property_keys() const
 {
     // 1. If IsPlatformObjectSameOrigin(this) is true, then return OrdinaryOwnPropertyKeys(this).
     if (HTML::is_platform_object_same_origin(*this))

+ 1 - 1
Libraries/LibWeb/HTML/Location.h

@@ -63,7 +63,7 @@ public:
     virtual JS::ThrowCompletionOr<JS::Value> internal_get(JS::PropertyKey const&, JS::Value receiver, JS::CacheablePropertyMetadata*, PropertyLookupPhase) const override;
     virtual JS::ThrowCompletionOr<bool> internal_set(JS::PropertyKey const&, JS::Value value, JS::Value receiver, JS::CacheablePropertyMetadata*) override;
     virtual JS::ThrowCompletionOr<bool> internal_delete(JS::PropertyKey const&) override;
-    virtual JS::ThrowCompletionOr<GC::MarkedVector<JS::Value>> internal_own_property_keys() const override;
+    virtual JS::ThrowCompletionOr<GC::RootVector<JS::Value>> internal_own_property_keys() const override;
 
     HTML::CrossOriginPropertyDescriptorMap const& cross_origin_property_descriptor_map() const { return m_cross_origin_property_descriptor_map; }
     HTML::CrossOriginPropertyDescriptorMap& cross_origin_property_descriptor_map() { return m_cross_origin_property_descriptor_map; }

+ 1 - 1
Libraries/LibWeb/HTML/MessageEvent.cpp

@@ -66,7 +66,7 @@ Variant<GC::Root<WindowProxy>, GC::Root<MessagePort>, Empty> MessageEvent::sourc
 GC::Ref<JS::Object> MessageEvent::ports() const
 {
     if (!m_ports_array) {
-        GC::MarkedVector<JS::Value> port_vector(heap());
+        GC::RootVector<JS::Value> port_vector(heap());
         for (auto const& port : m_ports)
             port_vector.append(port);
 

+ 1 - 1
Libraries/LibWeb/HTML/Navigation.cpp

@@ -1131,7 +1131,7 @@ bool Navigation::inner_navigate_event_firing_algorithm(
     // 33. If endResultIsSameDocument is true:
     if (end_result_is_same_document) {
         // 1. Let promisesList be an empty list.
-        GC::MarkedVector<GC::Ref<WebIDL::Promise>> promises_list(realm.heap());
+        GC::RootVector<GC::Ref<WebIDL::Promise>> promises_list(realm.heap());
 
         // 2. For each handler of event's navigation handler list:
         for (auto const& handler : event->navigation_handler_list()) {

+ 1 - 1
Libraries/LibWeb/HTML/StructuredSerialize.cpp

@@ -1040,7 +1040,7 @@ public:
 private:
     JS::VM& m_vm;
     ReadonlySpan<u32> m_serialized;
-    GC::MarkedVector<JS::Value> m_memory; // Index -> JS value
+    GC::RootVector<JS::Value> m_memory; // Index -> JS value
     size_t m_position { 0 };
 
     static GC::Ref<Bindings::PlatformObject> create_serialized_type(StringView interface_name, JS::Realm& realm)

+ 1 - 1
Libraries/LibWeb/HTML/StructuredSerializeTypes.h

@@ -10,7 +10,7 @@
 
 namespace Web::HTML {
 
-using DeserializationMemory = GC::MarkedVector<JS::Value>;
+using DeserializationMemory = GC::RootVector<JS::Value>;
 using SerializationRecord = Vector<u32>;
 using SerializationMemory = HashMap<GC::Root<JS::Value>, u32>;
 

+ 1 - 1
Libraries/LibWeb/HTML/TextTrackCue.h

@@ -6,7 +6,7 @@
 
 #pragma once
 
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibWeb/DOM/EventTarget.h>
 #include <LibWeb/HTML/TextTrack.h>
 

+ 1 - 1
Libraries/LibWeb/HTML/TextTrackCueList.h

@@ -6,7 +6,7 @@
 
 #pragma once
 
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibWeb/DOM/EventTarget.h>
 #include <LibWeb/HTML/TextTrackCue.h>
 

+ 1 - 1
Libraries/LibWeb/HTML/TextTrackList.h

@@ -6,7 +6,7 @@
 
 #pragma once
 
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibWeb/DOM/EventTarget.h>
 #include <LibWeb/HTML/TextTrack.h>
 

+ 1 - 1
Libraries/LibWeb/HTML/VideoTrackList.h

@@ -8,7 +8,7 @@
 
 #include <AK/Badge.h>
 #include <AK/String.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibWeb/DOM/EventTarget.h>
 #include <LibWeb/HTML/VideoTrack.h>
 

+ 2 - 2
Libraries/LibWeb/HTML/Window.cpp

@@ -526,7 +526,7 @@ void Window::consume_history_action_user_activation()
     auto navigables = top->active_document()->inclusive_descendant_navigables();
 
     // 4. Let windows be the list of Window objects constructed by taking the active window of each item in navigables.
-    GC::MarkedVector<GC::Ptr<Window>> windows(heap());
+    GC::RootVector<GC::Ptr<Window>> windows(heap());
     for (auto& n : navigables)
         windows.append(n->active_window());
 
@@ -551,7 +551,7 @@ void Window::consume_user_activation()
     auto navigables = top->active_document()->inclusive_descendant_navigables();
 
     // 4. Let windows be the list of Window objects constructed by taking the active window of each item in navigables.
-    GC::MarkedVector<GC::Ptr<Window>> windows(heap());
+    GC::RootVector<GC::Ptr<Window>> windows(heap());
     for (auto& n : navigables)
         windows.append(n->active_window());
 

+ 4 - 4
Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.cpp

@@ -218,13 +218,13 @@ GC::Ref<WebIDL::Promise> WindowOrWorkerGlobalScopeMixin::fetch(Fetch::RequestInf
 }
 
 // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout
-i32 WindowOrWorkerGlobalScopeMixin::set_timeout(TimerHandler handler, i32 timeout, GC::MarkedVector<JS::Value> arguments)
+i32 WindowOrWorkerGlobalScopeMixin::set_timeout(TimerHandler handler, i32 timeout, GC::RootVector<JS::Value> arguments)
 {
     return run_timer_initialization_steps(move(handler), timeout, move(arguments), Repeat::No);
 }
 
 // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval
-i32 WindowOrWorkerGlobalScopeMixin::set_interval(TimerHandler handler, i32 timeout, GC::MarkedVector<JS::Value> arguments)
+i32 WindowOrWorkerGlobalScopeMixin::set_interval(TimerHandler handler, i32 timeout, GC::RootVector<JS::Value> arguments)
 {
     return run_timer_initialization_steps(move(handler), timeout, move(arguments), Repeat::Yes);
 }
@@ -254,7 +254,7 @@ void WindowOrWorkerGlobalScopeMixin::clear_map_of_active_timers()
 
 // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timer-initialisation-steps
 // With no active script fix from https://github.com/whatwg/html/pull/9712
-i32 WindowOrWorkerGlobalScopeMixin::run_timer_initialization_steps(TimerHandler handler, i32 timeout, GC::MarkedVector<JS::Value> arguments, Repeat repeat, Optional<i32> previous_id)
+i32 WindowOrWorkerGlobalScopeMixin::run_timer_initialization_steps(TimerHandler handler, i32 timeout, GC::RootVector<JS::Value> arguments, Repeat repeat, Optional<i32> previous_id)
 {
     // 1. Let thisArg be global if that is a WorkerGlobalScope object; otherwise let thisArg be the WindowProxy that corresponds to global.
 
@@ -697,7 +697,7 @@ GC::Ref<JS::Object> WindowOrWorkerGlobalScopeMixin::supported_entry_types() cons
     auto& realm = this_impl().realm();
 
     if (!m_supported_entry_types_array) {
-        GC::MarkedVector<JS::Value> supported_entry_types(vm.heap());
+        GC::RootVector<JS::Value> supported_entry_types(vm.heap());
 
 #define __ENUMERATE_SUPPORTED_PERFORMANCE_ENTRY_TYPES(entry_type, cpp_class) \
     supported_entry_types.append(JS::PrimitiveString::create(vm, entry_type));

+ 3 - 3
Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.h

@@ -40,8 +40,8 @@ public:
     GC::Ref<WebIDL::Promise> create_image_bitmap(ImageBitmapSource image, WebIDL::Long sx, WebIDL::Long sy, WebIDL::Long sw, WebIDL::Long sh, Optional<ImageBitmapOptions> options = {}) const;
     GC::Ref<WebIDL::Promise> fetch(Fetch::RequestInfo const&, Fetch::RequestInit const&) const;
 
-    i32 set_timeout(TimerHandler, i32 timeout, GC::MarkedVector<JS::Value> arguments);
-    i32 set_interval(TimerHandler, i32 timeout, GC::MarkedVector<JS::Value> arguments);
+    i32 set_timeout(TimerHandler, i32 timeout, GC::RootVector<JS::Value> arguments);
+    i32 set_interval(TimerHandler, i32 timeout, GC::RootVector<JS::Value> arguments);
     void clear_timeout(i32);
     void clear_interval(i32);
     void clear_map_of_active_timers();
@@ -86,7 +86,7 @@ private:
         Yes,
         No,
     };
-    i32 run_timer_initialization_steps(TimerHandler handler, i32 timeout, GC::MarkedVector<JS::Value> arguments, Repeat repeat, Optional<i32> previous_id = {});
+    i32 run_timer_initialization_steps(TimerHandler handler, i32 timeout, GC::RootVector<JS::Value> arguments, Repeat repeat, Optional<i32> previous_id = {});
     void run_steps_after_a_timeout_impl(i32 timeout, Function<void()> completion_step, Optional<i32> timer_key = {});
 
     GC::Ref<WebIDL::Promise> create_image_bitmap_impl(ImageBitmapSource& image, Optional<WebIDL::Long> sx, Optional<WebIDL::Long> sy, Optional<WebIDL::Long> sw, Optional<WebIDL::Long> sh, Optional<ImageBitmapOptions>& options) const;

+ 3 - 3
Libraries/LibWeb/HTML/WindowProxy.cpp

@@ -5,7 +5,7 @@
  */
 
 #include <AK/Optional.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/Runtime/Completion.h>
 #include <LibJS/Runtime/GlobalObject.h>
 #include <LibJS/Runtime/PropertyDescriptor.h>
@@ -228,7 +228,7 @@ JS::ThrowCompletionOr<bool> WindowProxy::internal_delete(JS::PropertyKey const&
 }
 
 // 7.4.10 [[OwnPropertyKeys]] ( ), https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-ownpropertykeys
-JS::ThrowCompletionOr<GC::MarkedVector<JS::Value>> WindowProxy::internal_own_property_keys() const
+JS::ThrowCompletionOr<GC::RootVector<JS::Value>> WindowProxy::internal_own_property_keys() const
 {
     auto& event_loop = main_thread_event_loop();
     auto& vm = event_loop.vm();
@@ -236,7 +236,7 @@ JS::ThrowCompletionOr<GC::MarkedVector<JS::Value>> WindowProxy::internal_own_pro
     // 1. Let W be the value of the [[Window]] internal slot of this.
 
     // 2. Let keys be a new empty List.
-    auto keys = GC::MarkedVector<JS::Value> { vm.heap() };
+    auto keys = GC::RootVector<JS::Value> { vm.heap() };
 
     // 3. Let maxProperties be W's associated Document's document-tree child navigables's size.
     auto max_properties = m_window->associated_document().document_tree_child_navigables().size();

+ 1 - 1
Libraries/LibWeb/HTML/WindowProxy.h

@@ -30,7 +30,7 @@ public:
     virtual JS::ThrowCompletionOr<JS::Value> internal_get(JS::PropertyKey const&, JS::Value receiver, JS::CacheablePropertyMetadata*, PropertyLookupPhase) const override;
     virtual JS::ThrowCompletionOr<bool> internal_set(JS::PropertyKey const&, JS::Value value, JS::Value receiver, JS::CacheablePropertyMetadata*) override;
     virtual JS::ThrowCompletionOr<bool> internal_delete(JS::PropertyKey const&) override;
-    virtual JS::ThrowCompletionOr<GC::MarkedVector<JS::Value>> internal_own_property_keys() const override;
+    virtual JS::ThrowCompletionOr<GC::RootVector<JS::Value>> internal_own_property_keys() const override;
 
     GC::Ptr<Window> window() const { return m_window; }
     void set_window(GC::Ref<Window>);

+ 2 - 2
Libraries/LibWeb/HTML/WorkerDebugConsoleClient.cpp

@@ -5,7 +5,7 @@
  */
 
 #include <AK/StringBuilder.h>
-#include <LibGC/MarkedVector.h>
+#include <LibGC/RootVector.h>
 #include <LibJS/Runtime/Completion.h>
 #include <LibJS/Runtime/Realm.h>
 #include <LibJS/Runtime/VM.h>
@@ -60,7 +60,7 @@ JS::ThrowCompletionOr<JS::Value> WorkerDebugConsoleClient::printer(JS::Console::
         return JS::js_undefined();
     }
 
-    auto output = TRY(generically_format_values(arguments.get<GC::MarkedVector<JS::Value>>()));
+    auto output = TRY(generically_format_values(arguments.get<GC::RootVector<JS::Value>>()));
     m_console->output_debug_message(log_level, output);
     return JS::js_undefined();
 }

+ 1 - 1
Libraries/LibWeb/ResizeObserver/ResizeObserverEntry.cpp

@@ -76,7 +76,7 @@ void ResizeObserverEntry::visit_edges(JS::Cell::Visitor& visitor)
 
 static GC::Ref<JS::Object> to_js_array(JS::Realm& realm, Vector<GC::Ref<ResizeObserverSize>> const& sizes)
 {
-    GC::MarkedVector<JS::Value> vector(realm.heap());
+    GC::RootVector<JS::Value> vector(realm.heap());
     for (auto const& size : sizes)
         vector.append(JS::Value(size.ptr()));
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.