Jelajahi Sumber

LibJS+LibWeb: Rename Heap::allocate_without_realm to Heap::allocate

Now that the heap has no knowledge about a JavaScript realm and is
purely for managing the memory of the heap, it does not make sense
to name this function to say that it is a non-realm variant.
Shannon Booth 7 bulan lalu
induk
melakukan
1e54003cb1
100 mengubah file dengan 216 tambahan dan 216 penghapusan
  1. 1 1
      Libraries/LibJS/Bytecode/Generator.cpp
  2. 1 1
      Libraries/LibJS/Contrib/Test262/262Object.cpp
  3. 1 1
      Libraries/LibJS/CyclicModule.cpp
  4. 1 1
      Libraries/LibJS/Heap/Heap.h
  5. 1 1
      Libraries/LibJS/Heap/HeapFunction.h
  6. 4 4
      Libraries/LibJS/Runtime/AbstractOperations.cpp
  7. 1 1
      Libraries/LibJS/Runtime/Accessor.h
  8. 1 1
      Libraries/LibJS/Runtime/BigInt.cpp
  9. 1 1
      Libraries/LibJS/Runtime/DeclarativeEnvironment.cpp
  10. 2 2
      Libraries/LibJS/Runtime/GlobalEnvironment.cpp
  11. 7 7
      Libraries/LibJS/Runtime/Intrinsics.cpp
  12. 1 1
      Libraries/LibJS/Runtime/JobCallback.cpp
  13. 3 3
      Libraries/LibJS/Runtime/Object.cpp
  14. 4 4
      Libraries/LibJS/Runtime/PrimitiveString.cpp
  15. 1 1
      Libraries/LibJS/Runtime/Promise.cpp
  16. 1 1
      Libraries/LibJS/Runtime/PromiseCapability.cpp
  17. 2 2
      Libraries/LibJS/Runtime/PromiseConstructor.cpp
  18. 1 1
      Libraries/LibJS/Runtime/PromiseReaction.cpp
  19. 3 3
      Libraries/LibJS/Runtime/Realm.cpp
  20. 1 1
      Libraries/LibJS/Runtime/Realm.h
  21. 12 12
      Libraries/LibJS/Runtime/Shape.cpp
  22. 1 1
      Libraries/LibJS/Runtime/Symbol.cpp
  23. 10 10
      Libraries/LibJS/Runtime/VM.cpp
  24. 1 1
      Libraries/LibJS/Runtime/VM.h
  25. 1 1
      Libraries/LibJS/Script.cpp
  26. 2 2
      Libraries/LibJS/SourceTextModule.cpp
  27. 2 2
      Libraries/LibJS/SyntheticModule.cpp
  28. 2 2
      Libraries/LibWeb/Bindings/MainThreadVM.cpp
  29. 1 1
      Libraries/LibWeb/DOM/Document.cpp
  30. 1 1
      Libraries/LibWeb/DOM/DocumentLoading.h
  31. 13 13
      Libraries/LibWeb/DOM/Element.cpp
  32. 6 6
      Libraries/LibWeb/DOM/EventTarget.cpp
  33. 2 2
      Libraries/LibWeb/DOM/MutationObserver.cpp
  34. 2 2
      Libraries/LibWeb/Fetch/Fetching/PendingResponse.cpp
  35. 1 1
      Libraries/LibWeb/Fetch/Infrastructure/ConnectionTimingInfo.cpp
  36. 1 1
      Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.cpp
  37. 1 1
      Libraries/LibWeb/Fetch/Infrastructure/FetchController.cpp
  38. 1 1
      Libraries/LibWeb/Fetch/Infrastructure/FetchParams.cpp
  39. 2 2
      Libraries/LibWeb/Fetch/Infrastructure/FetchRecord.cpp
  40. 1 1
      Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.cpp
  41. 2 2
      Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp
  42. 1 1
      Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp
  43. 1 1
      Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.cpp
  44. 5 5
      Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.cpp
  45. 1 1
      Libraries/LibWeb/HTML/BrowsingContext.cpp
  46. 1 1
      Libraries/LibWeb/HTML/BrowsingContextGroup.cpp
  47. 1 1
      Libraries/LibWeb/HTML/CustomElements/CustomElementRegistry.cpp
  48. 1 1
      Libraries/LibWeb/HTML/DocumentState.cpp
  49. 2 2
      Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp
  50. 1 1
      Libraries/LibWeb/HTML/EventLoop/Task.cpp
  51. 1 1
      Libraries/LibWeb/HTML/HTMLAudioElement.cpp
  52. 1 1
      Libraries/LibWeb/HTML/HTMLBRElement.cpp
  53. 1 1
      Libraries/LibWeb/HTML/HTMLCanvasElement.cpp
  54. 2 2
      Libraries/LibWeb/HTML/HTMLDialogElement.cpp
  55. 1 1
      Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
  56. 1 1
      Libraries/LibWeb/HTML/HTMLImageElement.cpp
  57. 13 13
      Libraries/LibWeb/HTML/HTMLInputElement.cpp
  58. 1 1
      Libraries/LibWeb/HTML/HTMLLabelElement.cpp
  59. 1 1
      Libraries/LibWeb/HTML/HTMLObjectElement.cpp
  60. 1 1
      Libraries/LibWeb/HTML/HTMLVideoElement.cpp
  61. 14 14
      Libraries/LibWeb/HTML/Navigable.cpp
  62. 2 2
      Libraries/LibWeb/HTML/NavigableContainer.cpp
  63. 2 2
      Libraries/LibWeb/HTML/Navigation.cpp
  64. 4 4
      Libraries/LibWeb/HTML/Parser/HTMLParser.cpp
  65. 1 1
      Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp
  66. 1 1
      Libraries/LibWeb/HTML/Scripting/Environments.cpp
  67. 1 1
      Libraries/LibWeb/HTML/Scripting/Fetching.cpp
  68. 1 1
      Libraries/LibWeb/HTML/SessionHistoryEntry.cpp
  69. 1 1
      Libraries/LibWeb/HTML/SessionHistoryTraversalQueue.cpp
  70. 1 1
      Libraries/LibWeb/HTML/Timer.cpp
  71. 4 4
      Libraries/LibWeb/HTML/TraversableNavigable.cpp
  72. 1 1
      Libraries/LibWeb/Layout/Node.cpp
  73. 12 12
      Libraries/LibWeb/Layout/TreeBuilder.cpp
  74. 1 1
      Libraries/LibWeb/Page/Page.cpp
  75. 1 1
      Libraries/LibWeb/Painting/AudioPaintable.cpp
  76. 1 1
      Libraries/LibWeb/Painting/CanvasPaintable.cpp
  77. 1 1
      Libraries/LibWeb/Painting/CheckBoxPaintable.cpp
  78. 2 2
      Libraries/LibWeb/Painting/ImagePaintable.cpp
  79. 1 1
      Libraries/LibWeb/Painting/MarkerPaintable.cpp
  80. 1 1
      Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp
  81. 4 4
      Libraries/LibWeb/Painting/PaintableBox.cpp
  82. 1 1
      Libraries/LibWeb/Painting/RadioButtonPaintable.cpp
  83. 1 1
      Libraries/LibWeb/Painting/SVGClipPaintable.cpp
  84. 1 1
      Libraries/LibWeb/Painting/SVGForeignObjectPaintable.cpp
  85. 1 1
      Libraries/LibWeb/Painting/SVGGraphicsPaintable.cpp
  86. 1 1
      Libraries/LibWeb/Painting/SVGMaskPaintable.cpp
  87. 1 1
      Libraries/LibWeb/Painting/SVGPathPaintable.cpp
  88. 1 1
      Libraries/LibWeb/Painting/SVGSVGPaintable.cpp
  89. 1 1
      Libraries/LibWeb/Painting/TextPaintable.cpp
  90. 1 1
      Libraries/LibWeb/Painting/VideoPaintable.cpp
  91. 1 1
      Libraries/LibWeb/Painting/ViewportPaintable.cpp
  92. 1 1
      Libraries/LibWeb/Platform/TimerSerenity.cpp
  93. 1 1
      Libraries/LibWeb/SVG/SVGAElement.cpp
  94. 1 1
      Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
  95. 1 1
      Libraries/LibWeb/SVG/SVGDecodedImageData.h
  96. 1 1
      Libraries/LibWeb/SVG/SVGForeignObjectElement.cpp
  97. 1 1
      Libraries/LibWeb/SVG/SVGGElement.cpp
  98. 1 1
      Libraries/LibWeb/SVG/SVGGeometryElement.cpp
  99. 1 1
      Libraries/LibWeb/SVG/SVGImageElement.cpp
  100. 1 1
      Libraries/LibWeb/SVG/SVGSVGElement.cpp

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

@@ -422,7 +422,7 @@ CodeGenerationErrorOr<NonnullGCPtr<Executable>> Generator::compile(VM& vm, ASTNo
         label.set_address(block_offsets.get(block).value());
     }
 
-    auto executable = vm.heap().allocate_without_realm<Executable>(
+    auto executable = vm.heap().allocate<Executable>(
         move(bytecode),
         move(generator.m_identifier_table),
         move(generator.m_string_table),

+ 1 - 1
Libraries/LibJS/Contrib/Test262/262Object.cpp

@@ -66,7 +66,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::create_realm)
     auto root_execution_context = MUST(JS::Realm::initialize_host_defined_realm(
         vm,
         [&](JS::Realm& realm) -> JS::GlobalObject* {
-            global_object = vm.heap().allocate_without_realm<JS::Test262::GlobalObject>(realm);
+            global_object = vm.heap().allocate<JS::Test262::GlobalObject>(realm);
             return global_object;
         },
         nullptr));

+ 1 - 1
Libraries/LibJS/CyclicModule.cpp

@@ -54,7 +54,7 @@ PromiseCapability& CyclicModule::load_requested_modules(GCPtr<GraphLoadingState:
     auto promise_capability = MUST(new_promise_capability(vm(), vm().current_realm()->intrinsics().promise_constructor()));
 
     // 3. Let state be the GraphLoadingState Record { [[IsLoading]]: true, [[PendingModulesCount]]: 1, [[Visited]]: « », [[PromiseCapability]]: pc, [[HostDefined]]: hostDefined }.
-    auto state = heap().allocate_without_realm<GraphLoadingState>(promise_capability, true, 1, HashTable<JS::GCPtr<CyclicModule>> {}, move(host_defined));
+    auto state = heap().allocate<GraphLoadingState>(promise_capability, true, 1, HashTable<JS::GCPtr<CyclicModule>> {}, move(host_defined));
 
     // 4. Perform InnerModuleLoading(state, module).
     inner_module_loading(state);

+ 1 - 1
Libraries/LibJS/Heap/Heap.h

@@ -36,7 +36,7 @@ public:
     ~Heap();
 
     template<typename T, typename... Args>
-    NonnullGCPtr<T> allocate_without_realm(Args&&... args)
+    NonnullGCPtr<T> allocate(Args&&... args)
     {
         auto* memory = allocate_cell<T>();
         defer_gc();

+ 1 - 1
Libraries/LibJS/Heap/HeapFunction.h

@@ -19,7 +19,7 @@ class HeapFunction final : public Cell {
 public:
     static NonnullGCPtr<HeapFunction> create(Heap& heap, Function<T> function)
     {
-        return heap.allocate_without_realm<HeapFunction>(move(function));
+        return heap.allocate<HeapFunction>(move(function));
     }
 
     virtual ~HeapFunction() override = default;

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

@@ -394,7 +394,7 @@ NonnullGCPtr<DeclarativeEnvironment> new_declarative_environment(Environment& en
     // 1. Let env be a new Declarative Environment Record containing no bindings.
     // 2. Set env.[[OuterEnv]] to E.
     // 3. Return env.
-    return heap.allocate_without_realm<DeclarativeEnvironment>(&environment);
+    return heap.allocate<DeclarativeEnvironment>(&environment);
 }
 
 // 9.1.2.3 NewObjectEnvironment ( O, W, E ), https://tc39.es/ecma262/#sec-newobjectenvironment
@@ -407,7 +407,7 @@ NonnullGCPtr<ObjectEnvironment> new_object_environment(Object& object, bool is_w
     // 3. Set env.[[IsWithEnvironment]] to W.
     // 4. Set env.[[OuterEnv]] to E.
     // 5. Return env.
-    return heap.allocate_without_realm<ObjectEnvironment>(object, is_with_environment ? ObjectEnvironment::IsWithEnvironment::Yes : ObjectEnvironment::IsWithEnvironment::No, environment);
+    return heap.allocate<ObjectEnvironment>(object, is_with_environment ? ObjectEnvironment::IsWithEnvironment::Yes : ObjectEnvironment::IsWithEnvironment::No, environment);
 }
 
 // 9.1.2.4 NewFunctionEnvironment ( F, newTarget ), https://tc39.es/ecma262/#sec-newfunctionenvironment
@@ -416,7 +416,7 @@ NonnullGCPtr<FunctionEnvironment> new_function_environment(ECMAScriptFunctionObj
     auto& heap = function.heap();
 
     // 1. Let env be a new function Environment Record containing no bindings.
-    auto env = heap.allocate_without_realm<FunctionEnvironment>(function.environment());
+    auto env = heap.allocate<FunctionEnvironment>(function.environment());
 
     // 2. Set env.[[FunctionObject]] to F.
     env->set_function_object(function);
@@ -443,7 +443,7 @@ NonnullGCPtr<PrivateEnvironment> new_private_environment(VM& vm, PrivateEnvironm
 {
     // 1. Let names be a new empty List.
     // 2. Return the PrivateEnvironment Record { [[OuterPrivateEnvironment]]: outerPrivEnv, [[Names]]: names }.
-    return vm.heap().allocate_without_realm<PrivateEnvironment>(outer);
+    return vm.heap().allocate<PrivateEnvironment>(outer);
 }
 
 // 9.4.3 GetThisEnvironment ( ), https://tc39.es/ecma262/#sec-getthisenvironment

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

@@ -20,7 +20,7 @@ class Accessor final : public Cell {
 public:
     static NonnullGCPtr<Accessor> create(VM& vm, FunctionObject* getter, FunctionObject* setter)
     {
-        return vm.heap().allocate_without_realm<Accessor>(getter, setter);
+        return vm.heap().allocate<Accessor>(getter, setter);
     }
 
     FunctionObject* getter() const { return m_getter; }

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

@@ -15,7 +15,7 @@ JS_DEFINE_ALLOCATOR(BigInt);
 
 NonnullGCPtr<BigInt> BigInt::create(VM& vm, Crypto::SignedBigInteger big_integer)
 {
-    return vm.heap().allocate_without_realm<BigInt>(move(big_integer));
+    return vm.heap().allocate<BigInt>(move(big_integer));
 }
 
 BigInt::BigInt(Crypto::SignedBigInteger big_integer)

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

@@ -20,7 +20,7 @@ DeclarativeEnvironment* DeclarativeEnvironment::create_for_per_iteration_binding
     auto bindings = other.m_bindings.span().slice(0, bindings_size);
     auto* parent_environment = other.outer_environment();
 
-    return parent_environment->heap().allocate_without_realm<DeclarativeEnvironment>(parent_environment, bindings);
+    return parent_environment->heap().allocate<DeclarativeEnvironment>(parent_environment, bindings);
 }
 
 DeclarativeEnvironment::DeclarativeEnvironment()

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

@@ -21,8 +21,8 @@ GlobalEnvironment::GlobalEnvironment(Object& global_object, Object& this_value)
     : Environment(nullptr)
     , m_global_this_value(&this_value)
 {
-    m_object_record = global_object.heap().allocate_without_realm<ObjectEnvironment>(global_object, ObjectEnvironment::IsWithEnvironment::No, nullptr);
-    m_declarative_record = global_object.heap().allocate_without_realm<DeclarativeEnvironment>();
+    m_object_record = global_object.heap().allocate<ObjectEnvironment>(global_object, ObjectEnvironment::IsWithEnvironment::No, nullptr);
+    m_declarative_record = global_object.heap().allocate<DeclarativeEnvironment>();
 }
 
 void GlobalEnvironment::visit_edges(Cell::Visitor& visitor)

+ 7 - 7
Libraries/LibJS/Runtime/Intrinsics.cpp

@@ -148,7 +148,7 @@ ThrowCompletionOr<NonnullGCPtr<Intrinsics>> Intrinsics::create(Realm& realm)
     auto& vm = realm.vm();
 
     // 1. Set realmRec.[[Intrinsics]] to a new Record.
-    auto intrinsics = vm.heap().allocate_without_realm<Intrinsics>(realm);
+    auto intrinsics = vm.heap().allocate<Intrinsics>(realm);
     realm.set_intrinsics({}, intrinsics);
 
     // 2. Set fields of realmRec.[[Intrinsics]] with the values listed in Table 6.
@@ -179,26 +179,26 @@ ThrowCompletionOr<void> Intrinsics::initialize_intrinsics(Realm& realm)
     auto& vm = this->vm();
 
     // These are done first since other prototypes depend on their presence.
-    m_empty_object_shape = heap().allocate_without_realm<Shape>(realm);
-    m_object_prototype = heap().allocate_without_realm<ObjectPrototype>(realm);
+    m_empty_object_shape = heap().allocate<Shape>(realm);
+    m_object_prototype = heap().allocate<ObjectPrototype>(realm);
     m_object_prototype->convert_to_prototype_if_needed();
-    m_function_prototype = heap().allocate_without_realm<FunctionPrototype>(realm);
+    m_function_prototype = heap().allocate<FunctionPrototype>(realm);
     m_function_prototype->convert_to_prototype_if_needed();
 
-    m_new_object_shape = heap().allocate_without_realm<Shape>(realm);
+    m_new_object_shape = heap().allocate<Shape>(realm);
     m_new_object_shape->set_prototype_without_transition(m_object_prototype);
 
     // OPTIMIZATION: A lot of runtime algorithms create an "iterator result" object.
     //               We pre-bake a shape for these objects and remember the property offsets.
     //               This allows us to construct them very quickly.
-    m_iterator_result_object_shape = heap().allocate_without_realm<Shape>(realm);
+    m_iterator_result_object_shape = heap().allocate<Shape>(realm);
     m_iterator_result_object_shape->set_prototype_without_transition(m_object_prototype);
     m_iterator_result_object_shape->add_property_without_transition(vm.names.value, Attribute::Writable | Attribute::Configurable | Attribute::Enumerable);
     m_iterator_result_object_shape->add_property_without_transition(vm.names.done, Attribute::Writable | Attribute::Configurable | Attribute::Enumerable);
     m_iterator_result_object_value_offset = m_iterator_result_object_shape->lookup(vm.names.value.to_string_or_symbol()).value().offset;
     m_iterator_result_object_done_offset = m_iterator_result_object_shape->lookup(vm.names.done.to_string_or_symbol()).value().offset;
 
-    // Normally Realm::create() takes care of this, but these are allocated via Heap::allocate_without_realm().
+    // Normally Realm::create() takes care of this, but these are allocated via Heap::allocate().
     m_function_prototype->initialize(realm);
     m_object_prototype->initialize(realm);
 

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

@@ -13,7 +13,7 @@ JS_DEFINE_ALLOCATOR(JobCallback);
 
 JS::NonnullGCPtr<JobCallback> JobCallback::create(JS::VM& vm, FunctionObject& callback, OwnPtr<CustomData> custom_data)
 {
-    return vm.heap().allocate_without_realm<JobCallback>(callback, move(custom_data));
+    return vm.heap().allocate<JobCallback>(callback, move(custom_data));
 }
 
 void JobCallback::visit_edges(Visitor& visitor)

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

@@ -39,7 +39,7 @@ NonnullGCPtr<Object> Object::create(Realm& realm, Object* prototype)
 
 NonnullGCPtr<Object> Object::create_prototype(Realm& realm, Object* prototype)
 {
-    auto shape = realm.heap().allocate_without_realm<Shape>(realm);
+    auto shape = realm.heap().allocate<Shape>(realm);
     if (prototype)
         shape->set_prototype_without_transition(prototype);
     return realm.create<Object>(shape);
@@ -54,13 +54,13 @@ Object::Object(GlobalObjectTag, Realm& realm, MayInterfereWithIndexedPropertyAcc
     : m_may_interfere_with_indexed_property_access(may_interfere_with_indexed_property_access == MayInterfereWithIndexedPropertyAccess::Yes)
 {
     // This is the global object
-    m_shape = heap().allocate_without_realm<Shape>(realm);
+    m_shape = heap().allocate<Shape>(realm);
 }
 
 Object::Object(ConstructWithoutPrototypeTag, Realm& realm, MayInterfereWithIndexedPropertyAccess may_interfere_with_indexed_property_access)
     : m_may_interfere_with_indexed_property_access(may_interfere_with_indexed_property_access == MayInterfereWithIndexedPropertyAccess::Yes)
 {
-    m_shape = heap().allocate_without_realm<Shape>(realm);
+    m_shape = heap().allocate<Shape>(realm);
 }
 
 Object::Object(Realm& realm, Object* prototype, MayInterfereWithIndexedPropertyAccess may_interfere_with_indexed_property_access)

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

@@ -173,7 +173,7 @@ NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, Utf16String string
     if (auto it = string_cache.find(string); it != string_cache.end())
         return *it->value;
 
-    auto new_string = vm.heap().allocate_without_realm<PrimitiveString>(string);
+    auto new_string = vm.heap().allocate<PrimitiveString>(string);
     string_cache.set(move(string), new_string);
     return *new_string;
 }
@@ -193,7 +193,7 @@ NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, String string)
     if (auto it = string_cache.find(string); it != string_cache.end())
         return *it->value;
 
-    auto new_string = vm.heap().allocate_without_realm<PrimitiveString>(string);
+    auto new_string = vm.heap().allocate<PrimitiveString>(string);
     string_cache.set(move(string), new_string);
     return *new_string;
 }
@@ -222,7 +222,7 @@ NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, ByteString string)
     auto& string_cache = vm.byte_string_cache();
     auto it = string_cache.find(string);
     if (it == string_cache.end()) {
-        auto new_string = vm.heap().allocate_without_realm<PrimitiveString>(string);
+        auto new_string = vm.heap().allocate<PrimitiveString>(string);
         string_cache.set(move(string), new_string);
         return *new_string;
     }
@@ -251,7 +251,7 @@ NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, PrimitiveString& l
     if (rhs_empty)
         return lhs;
 
-    return vm.heap().allocate_without_realm<PrimitiveString>(lhs, rhs);
+    return vm.heap().allocate<PrimitiveString>(lhs, rhs);
 }
 
 void PrimitiveString::resolve_rope_if_needed(EncodingPreference preference) const

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

@@ -64,7 +64,7 @@ Promise::ResolvingFunctions Promise::create_resolving_functions()
     auto& realm = *vm.current_realm();
 
     // 1. Let alreadyResolved be the Record { [[Value]]: false }.
-    auto already_resolved = vm.heap().allocate_without_realm<AlreadyResolved>();
+    auto already_resolved = vm.heap().allocate<AlreadyResolved>();
 
     // 2. Let stepsResolve be the algorithm steps defined in Promise Resolve Functions.
     // 3. Let lengthResolve be the number of non-optional parameters of the function definition in Promise Resolve Functions.

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

@@ -15,7 +15,7 @@ JS_DEFINE_ALLOCATOR(PromiseCapability);
 
 NonnullGCPtr<PromiseCapability> PromiseCapability::create(VM& vm, NonnullGCPtr<Object> promise, NonnullGCPtr<FunctionObject> resolve, NonnullGCPtr<FunctionObject> reject)
 {
-    return vm.heap().allocate_without_realm<PromiseCapability>(promise, resolve, reject);
+    return vm.heap().allocate<PromiseCapability>(promise, resolve, reject);
 }
 
 PromiseCapability::PromiseCapability(NonnullGCPtr<Object> promise, NonnullGCPtr<FunctionObject> resolve, NonnullGCPtr<FunctionObject> reject)

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

@@ -46,10 +46,10 @@ static ThrowCompletionOr<Value> perform_promise_common(VM& vm, IteratorRecord& i
     VERIFY(promise_resolve.is_function());
 
     // 1. Let values be a new empty List.
-    auto values = vm.heap().allocate_without_realm<PromiseValueList>();
+    auto values = vm.heap().allocate<PromiseValueList>();
 
     // 2. Let remainingElementsCount be the Record { [[Value]]: 1 }.
-    auto remaining_elements_count = vm.heap().allocate_without_realm<RemainingElements>(1);
+    auto remaining_elements_count = vm.heap().allocate<RemainingElements>(1);
 
     // 3. Let index be 0.
     size_t index = 0;

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

@@ -14,7 +14,7 @@ JS_DEFINE_ALLOCATOR(PromiseReaction);
 
 NonnullGCPtr<PromiseReaction> PromiseReaction::create(VM& vm, Type type, GCPtr<PromiseCapability> capability, GCPtr<JobCallback> handler)
 {
-    return vm.heap().allocate_without_realm<PromiseReaction>(type, capability, move(handler));
+    return vm.heap().allocate<PromiseReaction>(type, capability, move(handler));
 }
 
 PromiseReaction::PromiseReaction(Type type, GCPtr<PromiseCapability> capability, GCPtr<JobCallback> handler)

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

@@ -22,7 +22,7 @@ ThrowCompletionOr<NonnullOwnPtr<ExecutionContext>> Realm::initialize_host_define
     DeferGC defer_gc(vm.heap());
 
     // 1. Let realm be a new Realm Record
-    auto realm = vm.heap().allocate_without_realm<Realm>();
+    auto realm = vm.heap().allocate<Realm>();
 
     // 2. Perform CreateIntrinsics(realm).
     MUST(Intrinsics::create(*realm));
@@ -61,7 +61,7 @@ ThrowCompletionOr<NonnullOwnPtr<ExecutionContext>> Realm::initialize_host_define
         // a. Let global be OrdinaryObjectCreate(realm.[[Intrinsics]].[[%Object.prototype%]]).
         // NOTE: We allocate a proper GlobalObject directly as this plain object is
         //       turned into one via SetDefaultGlobalBindings in the spec.
-        global = vm.heap().allocate_without_realm<GlobalObject>(realm);
+        global = vm.heap().allocate<GlobalObject>(realm);
     }
 
     // 14. If the host requires that the this binding in realm's global scope return an object other than the global object, then
@@ -80,7 +80,7 @@ ThrowCompletionOr<NonnullOwnPtr<ExecutionContext>> Realm::initialize_host_define
     realm->m_global_object = global;
 
     // 17. Set realm.[[GlobalEnv]] to NewGlobalEnvironment(global, thisValue).
-    realm->m_global_environment = vm.heap().allocate_without_realm<GlobalEnvironment>(*global, *this_value);
+    realm->m_global_environment = vm.heap().allocate<GlobalEnvironment>(*global, *this_value);
 
     // 18. Perform ? SetDefaultGlobalBindings(realm).
     set_default_global_bindings(*realm);

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

@@ -35,7 +35,7 @@ public:
     template<typename T, typename... Args>
     NonnullGCPtr<T> create(Args&&... args)
     {
-        auto object = heap().allocate_without_realm<T>(forward<Args>(args)...);
+        auto object = heap().allocate<T>(forward<Args>(args)...);
         static_cast<Cell*>(object)->initialize(*this);
         return *object;
     }

+ 12 - 12
Libraries/LibJS/Runtime/Shape.cpp

@@ -23,7 +23,7 @@ Shape::~Shape()
 
 NonnullGCPtr<Shape> Shape::create_cacheable_dictionary_transition()
 {
-    auto new_shape = heap().allocate_without_realm<Shape>(m_realm);
+    auto new_shape = heap().allocate<Shape>(m_realm);
     new_shape->m_dictionary = true;
     new_shape->m_cacheable = true;
     new_shape->m_prototype = m_prototype;
@@ -37,7 +37,7 @@ NonnullGCPtr<Shape> Shape::create_cacheable_dictionary_transition()
 
 NonnullGCPtr<Shape> Shape::create_uncacheable_dictionary_transition()
 {
-    auto new_shape = heap().allocate_without_realm<Shape>(m_realm);
+    auto new_shape = heap().allocate<Shape>(m_realm);
     new_shape->m_dictionary = true;
     new_shape->m_cacheable = true;
     new_shape->m_prototype = m_prototype;
@@ -105,7 +105,7 @@ NonnullGCPtr<Shape> Shape::create_put_transition(StringOrSymbol const& property_
     TransitionKey key { property_key, attributes };
     if (auto existing_shape = get_or_prune_cached_forward_transition(key))
         return *existing_shape;
-    auto new_shape = heap().allocate_without_realm<Shape>(*this, property_key, attributes, TransitionType::Put);
+    auto new_shape = heap().allocate<Shape>(*this, property_key, attributes, TransitionType::Put);
     invalidate_prototype_if_needed_for_new_prototype(new_shape);
     if (!m_is_prototype_shape) {
         if (!m_forward_transitions)
@@ -120,7 +120,7 @@ NonnullGCPtr<Shape> Shape::create_configure_transition(StringOrSymbol const& pro
     TransitionKey key { property_key, attributes };
     if (auto existing_shape = get_or_prune_cached_forward_transition(key))
         return *existing_shape;
-    auto new_shape = heap().allocate_without_realm<Shape>(*this, property_key, attributes, TransitionType::Configure);
+    auto new_shape = heap().allocate<Shape>(*this, property_key, attributes, TransitionType::Configure);
     invalidate_prototype_if_needed_for_new_prototype(new_shape);
     if (!m_is_prototype_shape) {
         if (!m_forward_transitions)
@@ -136,7 +136,7 @@ NonnullGCPtr<Shape> Shape::create_prototype_transition(Object* new_prototype)
         new_prototype->convert_to_prototype_if_needed();
     if (auto existing_shape = get_or_prune_cached_prototype_transition(new_prototype))
         return *existing_shape;
-    auto new_shape = heap().allocate_without_realm<Shape>(*this, new_prototype);
+    auto new_shape = heap().allocate<Shape>(*this, new_prototype);
     invalidate_prototype_if_needed_for_new_prototype(new_shape);
     if (!m_is_prototype_shape) {
         if (!m_prototype_transitions)
@@ -274,7 +274,7 @@ NonnullGCPtr<Shape> Shape::create_delete_transition(StringOrSymbol const& proper
 {
     if (auto existing_shape = get_or_prune_cached_delete_transition(property_key))
         return *existing_shape;
-    auto new_shape = heap().allocate_without_realm<Shape>(*this, property_key, TransitionType::Delete);
+    auto new_shape = heap().allocate<Shape>(*this, property_key, TransitionType::Delete);
     invalidate_prototype_if_needed_for_new_prototype(new_shape);
     if (!m_delete_transitions)
         m_delete_transitions = make<HashMap<StringOrSymbol, WeakPtr<Shape>>>();
@@ -321,11 +321,11 @@ void Shape::remove_property_without_transition(StringOrSymbol const& property_ke
 
 NonnullGCPtr<Shape> Shape::create_for_prototype(NonnullGCPtr<Realm> realm, GCPtr<Object> prototype)
 {
-    auto new_shape = realm->heap().allocate_without_realm<Shape>(realm);
+    auto new_shape = realm->heap().allocate<Shape>(realm);
     s_all_prototype_shapes.set(new_shape);
     new_shape->m_is_prototype_shape = true;
     new_shape->m_prototype = prototype;
-    new_shape->m_prototype_chain_validity = realm->heap().allocate_without_realm<PrototypeChainValidity>();
+    new_shape->m_prototype_chain_validity = realm->heap().allocate<PrototypeChainValidity>();
     return new_shape;
 }
 
@@ -333,7 +333,7 @@ NonnullGCPtr<Shape> Shape::clone_for_prototype()
 {
     VERIFY(!m_is_prototype_shape);
     VERIFY(!m_prototype_chain_validity);
-    auto new_shape = heap().allocate_without_realm<Shape>(m_realm);
+    auto new_shape = heap().allocate<Shape>(m_realm);
     s_all_prototype_shapes.set(new_shape);
     new_shape->m_is_prototype_shape = true;
     new_shape->m_prototype = m_prototype;
@@ -341,7 +341,7 @@ NonnullGCPtr<Shape> Shape::clone_for_prototype()
     new_shape->ensure_property_table();
     (*new_shape->m_property_table) = *m_property_table;
     new_shape->m_property_count = new_shape->m_property_table->size();
-    new_shape->m_prototype_chain_validity = heap().allocate_without_realm<PrototypeChainValidity>();
+    new_shape->m_prototype_chain_validity = heap().allocate<PrototypeChainValidity>();
     return new_shape;
 }
 
@@ -357,7 +357,7 @@ void Shape::set_prototype_shape()
     VERIFY(!m_is_prototype_shape);
     s_all_prototype_shapes.set(this);
     m_is_prototype_shape = true;
-    m_prototype_chain_validity = heap().allocate_without_realm<PrototypeChainValidity>();
+    m_prototype_chain_validity = heap().allocate<PrototypeChainValidity>();
 }
 
 void Shape::invalidate_prototype_if_needed_for_new_prototype(NonnullGCPtr<Shape> new_prototype_shape)
@@ -388,7 +388,7 @@ void Shape::invalidate_all_prototype_chains_leading_to_this()
         return;
     for (auto* shape : shapes_to_invalidate) {
         shape->m_prototype_chain_validity->set_valid(false);
-        shape->m_prototype_chain_validity = heap().allocate_without_realm<PrototypeChainValidity>();
+        shape->m_prototype_chain_validity = heap().allocate<PrototypeChainValidity>();
     }
 }
 

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

@@ -21,7 +21,7 @@ Symbol::Symbol(Optional<String> description, bool is_global)
 
 NonnullGCPtr<Symbol> Symbol::create(VM& vm, Optional<String> description, bool is_global)
 {
-    return vm.heap().allocate_without_realm<Symbol>(move(description), is_global);
+    return vm.heap().allocate<Symbol>(move(description), is_global);
 }
 
 // 20.4.3.3.1 SymbolDescriptiveString ( sym ), https://tc39.es/ecma262/#sec-symboldescriptivestring

+ 10 - 10
Libraries/LibJS/Runtime/VM.cpp

@@ -68,21 +68,21 @@ VM::VM(OwnPtr<CustomData> custom_data, ErrorMessages error_messages)
 {
     m_bytecode_interpreter = make<Bytecode::Interpreter>(*this);
 
-    m_empty_string = m_heap.allocate_without_realm<PrimitiveString>(String {});
+    m_empty_string = m_heap.allocate<PrimitiveString>(String {});
 
     typeof_strings = {
-        .number = m_heap.allocate_without_realm<PrimitiveString>("number"),
-        .undefined = m_heap.allocate_without_realm<PrimitiveString>("undefined"),
-        .object = m_heap.allocate_without_realm<PrimitiveString>("object"),
-        .string = m_heap.allocate_without_realm<PrimitiveString>("string"),
-        .symbol = m_heap.allocate_without_realm<PrimitiveString>("symbol"),
-        .boolean = m_heap.allocate_without_realm<PrimitiveString>("boolean"),
-        .bigint = m_heap.allocate_without_realm<PrimitiveString>("bigint"),
-        .function = m_heap.allocate_without_realm<PrimitiveString>("function"),
+        .number = m_heap.allocate<PrimitiveString>("number"),
+        .undefined = m_heap.allocate<PrimitiveString>("undefined"),
+        .object = m_heap.allocate<PrimitiveString>("object"),
+        .string = m_heap.allocate<PrimitiveString>("string"),
+        .symbol = m_heap.allocate<PrimitiveString>("symbol"),
+        .boolean = m_heap.allocate<PrimitiveString>("boolean"),
+        .bigint = m_heap.allocate<PrimitiveString>("bigint"),
+        .function = m_heap.allocate<PrimitiveString>("function"),
     };
 
     for (size_t i = 0; i < single_ascii_character_strings.size(); ++i)
-        m_single_ascii_character_strings[i] = m_heap.allocate_without_realm<PrimitiveString>(single_ascii_character_strings[i]);
+        m_single_ascii_character_strings[i] = m_heap.allocate<PrimitiveString>(single_ascii_character_strings[i]);
 
     // Default hook implementations. These can be overridden by the host, for example, LibWeb overrides the default hooks to place promise jobs on the microtask queue.
     host_promise_rejection_tracker = [this](Promise& promise, Promise::RejectionOperation operation) {

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

@@ -358,7 +358,7 @@ template<typename GlobalObjectType, typename... Args>
     auto root_execution_context = MUST(Realm::initialize_host_defined_realm(
         vm,
         [&](Realm& realm_) -> GlobalObject* {
-            return vm.heap().allocate_without_realm<GlobalObjectType>(realm_, forward<Args>(args)...);
+            return vm.heap().allocate<GlobalObjectType>(realm_, forward<Args>(args)...);
         },
         nullptr));
     return root_execution_context;

+ 1 - 1
Libraries/LibJS/Script.cpp

@@ -26,7 +26,7 @@ Result<NonnullGCPtr<Script>, Vector<ParserError>> Script::parse(StringView sourc
         return parser.errors();
 
     // 3. Return Script Record { [[Realm]]: realm, [[ECMAScriptCode]]: script, [[HostDefined]]: hostDefined }.
-    return realm.heap().allocate_without_realm<Script>(realm, filename, move(script), host_defined);
+    return realm.heap().allocate<Script>(realm, filename, move(script), host_defined);
 }
 
 Script::Script(Realm& realm, StringView filename, NonnullRefPtr<Program> parse_node, HostDefined* host_defined)

+ 2 - 2
Libraries/LibJS/SourceTextModule.cpp

@@ -246,7 +246,7 @@ Result<NonnullGCPtr<SourceTextModule>, Vector<ParserError>> SourceTextModule::pa
     //          [[HostDefined]]: hostDefined, [[ECMAScriptCode]]: body, [[Context]]: empty, [[ImportMeta]]: empty,
     //          [[RequestedModules]]: requestedModules, [[ImportEntries]]: importEntries, [[LocalExportEntries]]: localExportEntries,
     //          [[IndirectExportEntries]]: indirectExportEntries, [[StarExportEntries]]: starExportEntries, [[DFSIndex]]: empty, [[DFSAncestorIndex]]: empty }.
-    return realm.heap().allocate_without_realm<SourceTextModule>(
+    return realm.heap().allocate<SourceTextModule>(
         realm,
         filename,
         host_defined,
@@ -359,7 +359,7 @@ ThrowCompletionOr<void> SourceTextModule::initialize_environment(VM& vm)
     // Note: This must be true because we use a reference.
 
     // 5. Let env be NewModuleEnvironment(realm.[[GlobalEnv]]).
-    auto environment = vm.heap().allocate_without_realm<ModuleEnvironment>(&realm().global_environment());
+    auto environment = vm.heap().allocate<ModuleEnvironment>(&realm().global_environment());
 
     // 6. Set module.[[Environment]] to env.
     set_environment(environment);

+ 2 - 2
Libraries/LibJS/SyntheticModule.cpp

@@ -55,7 +55,7 @@ ThrowCompletionOr<void> SyntheticModule::link(VM& vm)
     // Note: This must be true because we use a reference.
 
     // 3. Let env be NewModuleEnvironment(realm.[[GlobalEnv]]).
-    auto environment = vm.heap().allocate_without_realm<ModuleEnvironment>(&realm().global_environment());
+    auto environment = vm.heap().allocate<ModuleEnvironment>(&realm().global_environment());
 
     // 4. Set module.[[Environment]] to env.
     set_environment(environment);
@@ -143,7 +143,7 @@ NonnullGCPtr<SyntheticModule> SyntheticModule::create_default_export_synthetic_m
     };
 
     // 2. Return CreateSyntheticModule("default", closure, realm)
-    return realm.heap().allocate_without_realm<SyntheticModule>(Vector<DeprecatedFlyString> { "default" }, move(closure), realm, filename);
+    return realm.heap().allocate<SyntheticModule>(Vector<DeprecatedFlyString> { "default" }, move(closure), realm, filename);
 }
 
 // 1.4 ParseJSONModule ( source ), https://tc39.es/proposal-json-modules/#sec-parse-json-module

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

@@ -96,7 +96,7 @@ ErrorOr<void> initialize_main_thread_vm(HTML::EventLoop::Type type)
     s_main_thread_vm->ref();
 
     auto& custom_data = verify_cast<WebEngineCustomData>(*s_main_thread_vm->custom_data());
-    custom_data.event_loop = s_main_thread_vm->heap().allocate_without_realm<HTML::EventLoop>(type);
+    custom_data.event_loop = s_main_thread_vm->heap().allocate<HTML::EventLoop>(type);
 
     // These strings could potentially live on the VM similar to CommonPropertyNames.
     DOM::MutationType::initialize_strings();
@@ -595,7 +595,7 @@ ErrorOr<void> initialize_main_thread_vm(HTML::EventLoop::Type type)
         realm.set_global_object(global_object);
 
         // 10. Set realm.[[GlobalEnv]] to NewGlobalEnvironment(globalObject, globalObject).
-        realm.set_global_environment(realm.heap().allocate_without_realm<JS::GlobalEnvironment>(global_object, global_object));
+        realm.set_global_environment(realm.heap().allocate<JS::GlobalEnvironment>(global_object, global_object));
 
         // 11. Perform ? SetDefaultGlobalBindings(realm).
         set_default_global_bindings(realm);

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

@@ -4201,7 +4201,7 @@ void Document::start_intersection_observing_a_lazy_loading_element(Element& elem
         // Spec Note: This allows for fetching the image during scrolling, when it does not yet — but is about to — intersect the viewport.
         auto options = IntersectionObserver::IntersectionObserverInit {};
 
-        auto wrapped_callback = realm.heap().allocate_without_realm<WebIDL::CallbackType>(callback, Bindings::principal_host_defined_environment_settings_object(realm));
+        auto wrapped_callback = realm.heap().allocate<WebIDL::CallbackType>(callback, Bindings::principal_host_defined_environment_settings_object(realm));
         m_lazy_load_intersection_observer = IntersectionObserver::IntersectionObserver::construct_impl(realm, wrapped_callback, options).release_value_but_fixme_should_propagate_errors();
     }
 

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

@@ -55,7 +55,7 @@ JS::NonnullGCPtr<DOM::Document> create_document_for_inline_content(JS::GCPtr<HTM
     //    about base URL: null
     auto response = Fetch::Infrastructure::Response::create(vm);
     response->url_list().append(URL::URL("about:error")); // AD-HOC: https://github.com/whatwg/html/issues/9122
-    auto navigation_params = vm.heap().allocate_without_realm<HTML::NavigationParams>();
+    auto navigation_params = vm.heap().allocate<HTML::NavigationParams>();
     navigation_params->id = navigation_id;
     navigation_params->navigable = navigable;
     navigation_params->request = nullptr;

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

@@ -398,17 +398,17 @@ JS::GCPtr<Layout::Node> Element::create_layout_node(CSS::StyleProperties style)
 JS::GCPtr<Layout::NodeWithStyle> Element::create_layout_node_for_display_type(DOM::Document& document, CSS::Display const& display, CSS::StyleProperties style, Element* element)
 {
     if (display.is_table_inside() || display.is_table_row_group() || display.is_table_header_group() || display.is_table_footer_group() || display.is_table_row())
-        return document.heap().allocate_without_realm<Layout::Box>(document, element, move(style));
+        return document.heap().allocate<Layout::Box>(document, element, move(style));
 
     if (display.is_list_item())
-        return document.heap().allocate_without_realm<Layout::ListItemBox>(document, element, move(style));
+        return document.heap().allocate<Layout::ListItemBox>(document, element, move(style));
 
     if (display.is_table_cell())
-        return document.heap().allocate_without_realm<Layout::BlockContainer>(document, element, move(style));
+        return document.heap().allocate<Layout::BlockContainer>(document, element, move(style));
 
     if (display.is_table_column() || display.is_table_column_group() || display.is_table_caption()) {
         // FIXME: This is just an incorrect placeholder until we improve table layout support.
-        return document.heap().allocate_without_realm<Layout::BlockContainer>(document, element, move(style));
+        return document.heap().allocate<Layout::BlockContainer>(document, element, move(style));
     }
 
     if (display.is_math_inside()) {
@@ -416,30 +416,30 @@ JS::GCPtr<Layout::NodeWithStyle> Element::create_layout_node_for_display_type(DO
         // MathML elements with a computed display value equal to block math or inline math control box generation
         // and layout according to their tag name, as described in the relevant sections.
         // FIXME: Figure out what kind of node we should make for them. For now, we'll stick with a generic Box.
-        return document.heap().allocate_without_realm<Layout::BlockContainer>(document, element, move(style));
+        return document.heap().allocate<Layout::BlockContainer>(document, element, move(style));
     }
 
     if (display.is_inline_outside()) {
         if (display.is_flow_root_inside())
-            return document.heap().allocate_without_realm<Layout::BlockContainer>(document, element, move(style));
+            return document.heap().allocate<Layout::BlockContainer>(document, element, move(style));
         if (display.is_flow_inside())
-            return document.heap().allocate_without_realm<Layout::InlineNode>(document, element, move(style));
+            return document.heap().allocate<Layout::InlineNode>(document, element, move(style));
         if (display.is_flex_inside())
-            return document.heap().allocate_without_realm<Layout::Box>(document, element, move(style));
+            return document.heap().allocate<Layout::Box>(document, element, move(style));
         if (display.is_grid_inside())
-            return document.heap().allocate_without_realm<Layout::Box>(document, element, move(style));
+            return document.heap().allocate<Layout::Box>(document, element, move(style));
         dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Support display: {}", display.to_string());
-        return document.heap().allocate_without_realm<Layout::InlineNode>(document, element, move(style));
+        return document.heap().allocate<Layout::InlineNode>(document, element, move(style));
     }
 
     if (display.is_flex_inside() || display.is_grid_inside())
-        return document.heap().allocate_without_realm<Layout::Box>(document, element, move(style));
+        return document.heap().allocate<Layout::Box>(document, element, move(style));
 
     if (display.is_flow_inside() || display.is_flow_root_inside() || display.is_contents())
-        return document.heap().allocate_without_realm<Layout::BlockContainer>(document, element, move(style));
+        return document.heap().allocate<Layout::BlockContainer>(document, element, move(style));
 
     dbgln("FIXME: CSS display '{}' not implemented yet.", display.to_string());
-    return document.heap().allocate_without_realm<Layout::InlineNode>(document, element, move(style));
+    return document.heap().allocate<Layout::InlineNode>(document, element, move(style));
 }
 
 void Element::run_attribute_change_steps(FlyString const& local_name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_)

+ 6 - 6
Libraries/LibWeb/DOM/EventTarget.cpp

@@ -154,7 +154,7 @@ void EventTarget::add_event_listener(FlyString const& type, IDLEventListener* ca
     // 2. Add an event listener with this and an event listener whose type is type, callback is callback, capture is capture, passive is passive,
     //    once is once, and signal is signal.
 
-    auto event_listener = heap().allocate_without_realm<DOMEventListener>();
+    auto event_listener = heap().allocate<DOMEventListener>();
     event_listener->type = type;
     event_listener->callback = callback;
     event_listener->signal = move(flattened_options.signal);
@@ -499,7 +499,7 @@ WebIDL::CallbackType* EventTarget::get_current_value_of_event_handler(FlyString
         function->set_script_or_module({});
 
         // 12. Set eventHandler's value to the result of creating a Web IDL EventHandler callback function object whose object reference is function and whose callback context is settings object.
-        event_handler->value = JS::GCPtr(realm.heap().allocate_without_realm<WebIDL::CallbackType>(*function, settings_object));
+        event_handler->value = JS::GCPtr(realm.heap().allocate<WebIDL::CallbackType>(*function, settings_object));
     }
 
     // 4. Return eventHandler's value.
@@ -533,7 +533,7 @@ void EventTarget::set_event_handler_attribute(FlyString const& name, WebIDL::Cal
     //  3. Set eventHandler's value to the given value.
     if (event_handler_iterator == handler_map.end()) {
         // NOTE: See the optimization comment in get_current_value_of_event_handler about why this is done.
-        auto new_event_handler = heap().allocate_without_realm<HTML::EventHandler>(*value);
+        auto new_event_handler = heap().allocate<HTML::EventHandler>(*value);
 
         //  4. Activate an event handler given eventTarget and name.
         // Optimization: We pass in the event handler here instead of having activate_event_handler do another hash map lookup just to get the same object.
@@ -591,10 +591,10 @@ void EventTarget::activate_event_handler(FlyString const& name, HTML::EventHandl
         0, "", &realm);
 
     // NOTE: As per the spec, the callback context is arbitrary.
-    auto callback = realm.heap().allocate_without_realm<WebIDL::CallbackType>(*callback_function, Bindings::principal_host_defined_environment_settings_object(realm));
+    auto callback = realm.heap().allocate<WebIDL::CallbackType>(*callback_function, Bindings::principal_host_defined_environment_settings_object(realm));
 
     // 5. Let listener be a new event listener whose type is the event handler event type corresponding to eventHandler and callback is callback.
-    auto listener = realm.heap().allocate_without_realm<DOMEventListener>();
+    auto listener = realm.heap().allocate<DOMEventListener>();
     listener->type = name;
     listener->callback = IDLEventListener::create(realm, *callback);
 
@@ -759,7 +759,7 @@ void EventTarget::element_event_handler_attribute_changed(FlyString const& local
     // NOTE: See the optimization comments in set_event_handler_attribute.
 
     if (event_handler_iterator == handler_map.end()) {
-        auto new_event_handler = heap().allocate_without_realm<HTML::EventHandler>(value->to_byte_string());
+        auto new_event_handler = heap().allocate<HTML::EventHandler>(value->to_byte_string());
 
         //  6. Activate an event handler given eventTarget and name.
         event_target->activate_event_handler(local_name, *new_event_handler);

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

@@ -162,7 +162,7 @@ Vector<JS::Handle<MutationRecord>> MutationObserver::take_records()
 
 JS::NonnullGCPtr<RegisteredObserver> RegisteredObserver::create(MutationObserver& observer, MutationObserverInit const& options)
 {
-    return observer.heap().allocate_without_realm<RegisteredObserver>(observer, options);
+    return observer.heap().allocate<RegisteredObserver>(observer, options);
 }
 
 RegisteredObserver::RegisteredObserver(MutationObserver& observer, MutationObserverInit const& options)
@@ -181,7 +181,7 @@ void RegisteredObserver::visit_edges(Cell::Visitor& visitor)
 
 JS::NonnullGCPtr<TransientRegisteredObserver> TransientRegisteredObserver::create(MutationObserver& observer, MutationObserverInit const& options, RegisteredObserver& source)
 {
-    return observer.heap().allocate_without_realm<TransientRegisteredObserver>(observer, options, source);
+    return observer.heap().allocate<TransientRegisteredObserver>(observer, options, source);
 }
 
 TransientRegisteredObserver::TransientRegisteredObserver(MutationObserver& observer, MutationObserverInit const& options, RegisteredObserver& source)

+ 2 - 2
Libraries/LibWeb/Fetch/Fetching/PendingResponse.cpp

@@ -16,12 +16,12 @@ JS_DEFINE_ALLOCATOR(PendingResponse);
 
 JS::NonnullGCPtr<PendingResponse> PendingResponse::create(JS::VM& vm, JS::NonnullGCPtr<Infrastructure::Request> request)
 {
-    return vm.heap().allocate_without_realm<PendingResponse>(request);
+    return vm.heap().allocate<PendingResponse>(request);
 }
 
 JS::NonnullGCPtr<PendingResponse> PendingResponse::create(JS::VM& vm, JS::NonnullGCPtr<Infrastructure::Request> request, JS::NonnullGCPtr<Infrastructure::Response> response)
 {
-    return vm.heap().allocate_without_realm<PendingResponse>(request, response);
+    return vm.heap().allocate<PendingResponse>(request, response);
 }
 
 PendingResponse::PendingResponse(JS::NonnullGCPtr<Infrastructure::Request> request, JS::GCPtr<Infrastructure::Response> response)

+ 1 - 1
Libraries/LibWeb/Fetch/Infrastructure/ConnectionTimingInfo.cpp

@@ -16,7 +16,7 @@ ConnectionTimingInfo::ConnectionTimingInfo() = default;
 
 JS::NonnullGCPtr<ConnectionTimingInfo> ConnectionTimingInfo::create(JS::VM& vm)
 {
-    return vm.heap().allocate_without_realm<ConnectionTimingInfo>();
+    return vm.heap().allocate<ConnectionTimingInfo>();
 }
 
 }

+ 1 - 1
Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.cpp

@@ -20,7 +20,7 @@ JS::NonnullGCPtr<FetchAlgorithms> FetchAlgorithms::create(JS::VM& vm, Input inpu
     auto process_response = JS::create_heap_function(vm.heap(), move(input.process_response));
     auto process_response_end_of_body = JS::create_heap_function(vm.heap(), move(input.process_response_end_of_body));
     auto process_response_consume_body = JS::create_heap_function(vm.heap(), move(input.process_response_consume_body));
-    return vm.heap().allocate_without_realm<FetchAlgorithms>(
+    return vm.heap().allocate<FetchAlgorithms>(
         process_request_body_chunk_length,
         process_request_end_of_body,
         process_early_hints_response,

+ 1 - 1
Libraries/LibWeb/Fetch/Infrastructure/FetchController.cpp

@@ -20,7 +20,7 @@ FetchController::FetchController() = default;
 
 JS::NonnullGCPtr<FetchController> FetchController::create(JS::VM& vm)
 {
-    return vm.heap().allocate_without_realm<FetchController>();
+    return vm.heap().allocate<FetchController>();
 }
 
 void FetchController::visit_edges(JS::Cell::Visitor& visitor)

+ 1 - 1
Libraries/LibWeb/Fetch/Infrastructure/FetchParams.cpp

@@ -26,7 +26,7 @@ JS::NonnullGCPtr<FetchParams> FetchParams::create(JS::VM& vm, JS::NonnullGCPtr<R
 {
     auto algorithms = Infrastructure::FetchAlgorithms::create(vm, {});
     auto controller = Infrastructure::FetchController::create(vm);
-    return vm.heap().allocate_without_realm<FetchParams>(request, algorithms, controller, timing_info);
+    return vm.heap().allocate<FetchParams>(request, algorithms, controller, timing_info);
 }
 
 void FetchParams::visit_edges(JS::Cell::Visitor& visitor)

+ 2 - 2
Libraries/LibWeb/Fetch/Infrastructure/FetchRecord.cpp

@@ -12,12 +12,12 @@ JS_DEFINE_ALLOCATOR(FetchRecord);
 
 JS::NonnullGCPtr<FetchRecord> FetchRecord::create(JS::VM& vm, JS::NonnullGCPtr<Infrastructure::Request> request)
 {
-    return vm.heap().allocate_without_realm<FetchRecord>(request);
+    return vm.heap().allocate<FetchRecord>(request);
 }
 
 JS::NonnullGCPtr<FetchRecord> FetchRecord::create(JS::VM& vm, JS::NonnullGCPtr<Infrastructure::Request> request, JS::GCPtr<Fetch::Infrastructure::FetchController> fetch_controller)
 {
-    return vm.heap().allocate_without_realm<FetchRecord>(request, fetch_controller);
+    return vm.heap().allocate<FetchRecord>(request, fetch_controller);
 }
 
 FetchRecord::FetchRecord(JS::NonnullGCPtr<Infrastructure::Request> request)

+ 1 - 1
Libraries/LibWeb/Fetch/Infrastructure/FetchTimingInfo.cpp

@@ -16,7 +16,7 @@ FetchTimingInfo::FetchTimingInfo() = default;
 
 JS::NonnullGCPtr<FetchTimingInfo> FetchTimingInfo::create(JS::VM& vm)
 {
-    return vm.heap().allocate_without_realm<FetchTimingInfo>();
+    return vm.heap().allocate<FetchTimingInfo>();
 }
 
 void FetchTimingInfo::visit_edges(JS::Cell::Visitor& visitor)

+ 2 - 2
Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp

@@ -20,12 +20,12 @@ JS_DEFINE_ALLOCATOR(Body);
 
 JS::NonnullGCPtr<Body> Body::create(JS::VM& vm, JS::NonnullGCPtr<Streams::ReadableStream> stream)
 {
-    return vm.heap().allocate_without_realm<Body>(stream);
+    return vm.heap().allocate<Body>(stream);
 }
 
 JS::NonnullGCPtr<Body> Body::create(JS::VM& vm, JS::NonnullGCPtr<Streams::ReadableStream> stream, SourceType source, Optional<u64> length)
 {
-    return vm.heap().allocate_without_realm<Body>(stream, source, length);
+    return vm.heap().allocate<Body>(stream, source, length);
 }
 
 Body::Body(JS::NonnullGCPtr<Streams::ReadableStream> stream)

+ 1 - 1
Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.cpp

@@ -60,7 +60,7 @@ Header Header::from_string_pair(StringView name, StringView value)
 
 JS::NonnullGCPtr<HeaderList> HeaderList::create(JS::VM& vm)
 {
-    return vm.heap().allocate_without_realm<HeaderList>();
+    return vm.heap().allocate<HeaderList>();
 }
 
 // Non-standard

+ 1 - 1
Libraries/LibWeb/Fetch/Infrastructure/HTTP/Requests.cpp

@@ -37,7 +37,7 @@ void Request::visit_edges(JS::Cell::Visitor& visitor)
 
 JS::NonnullGCPtr<Request> Request::create(JS::VM& vm)
 {
-    return vm.heap().allocate_without_realm<Request>(HeaderList::create(vm));
+    return vm.heap().allocate<Request>(HeaderList::create(vm));
 }
 
 // https://fetch.spec.whatwg.org/#concept-request-url

+ 5 - 5
Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.cpp

@@ -38,7 +38,7 @@ void Response::visit_edges(JS::Cell::Visitor& visitor)
 
 JS::NonnullGCPtr<Response> Response::create(JS::VM& vm)
 {
-    return vm.heap().allocate_without_realm<Response>(HeaderList::create(vm));
+    return vm.heap().allocate<Response>(HeaderList::create(vm));
 }
 
 // https://fetch.spec.whatwg.org/#ref-for-concept-network-error%E2%91%A3
@@ -360,7 +360,7 @@ JS::NonnullGCPtr<BasicFilteredResponse> BasicFilteredResponse::create(JS::VM& vm
             header_list->append(header);
     }
 
-    return vm.heap().allocate_without_realm<BasicFilteredResponse>(internal_response, header_list);
+    return vm.heap().allocate<BasicFilteredResponse>(internal_response, header_list);
 }
 
 BasicFilteredResponse::BasicFilteredResponse(JS::NonnullGCPtr<Response> internal_response, JS::NonnullGCPtr<HeaderList> header_list)
@@ -390,7 +390,7 @@ JS::NonnullGCPtr<CORSFilteredResponse> CORSFilteredResponse::create(JS::VM& vm,
             header_list->append(header);
     }
 
-    return vm.heap().allocate_without_realm<CORSFilteredResponse>(internal_response, header_list);
+    return vm.heap().allocate<CORSFilteredResponse>(internal_response, header_list);
 }
 
 CORSFilteredResponse::CORSFilteredResponse(JS::NonnullGCPtr<Response> internal_response, JS::NonnullGCPtr<HeaderList> header_list)
@@ -409,7 +409,7 @@ JS::NonnullGCPtr<OpaqueFilteredResponse> OpaqueFilteredResponse::create(JS::VM&
 {
     // An opaque filtered response is a filtered response whose type is "opaque", URL list is the empty list,
     // status is 0, status message is the empty byte sequence, header list is empty, and body is null.
-    return vm.heap().allocate_without_realm<OpaqueFilteredResponse>(internal_response, HeaderList::create(vm));
+    return vm.heap().allocate<OpaqueFilteredResponse>(internal_response, HeaderList::create(vm));
 }
 
 OpaqueFilteredResponse::OpaqueFilteredResponse(JS::NonnullGCPtr<Response> internal_response, JS::NonnullGCPtr<HeaderList> header_list)
@@ -429,7 +429,7 @@ JS::NonnullGCPtr<OpaqueRedirectFilteredResponse> OpaqueRedirectFilteredResponse:
 {
     // An opaque-redirect filtered response is a filtered response whose type is "opaqueredirect",
     // status is 0, status message is the empty byte sequence, header list is empty, and body is null.
-    return vm.heap().allocate_without_realm<OpaqueRedirectFilteredResponse>(internal_response, HeaderList::create(vm));
+    return vm.heap().allocate<OpaqueRedirectFilteredResponse>(internal_response, HeaderList::create(vm));
 }
 
 OpaqueRedirectFilteredResponse::OpaqueRedirectFilteredResponse(JS::NonnullGCPtr<Response> internal_response, JS::NonnullGCPtr<HeaderList> header_list)

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

@@ -139,7 +139,7 @@ WebIDL::ExceptionOr<BrowsingContext::BrowsingContextAndDocument> BrowsingContext
     auto& vm = group->vm();
 
     // 1. Let browsingContext be a new browsing context.
-    JS::NonnullGCPtr<BrowsingContext> browsing_context = *vm.heap().allocate_without_realm<BrowsingContext>(page);
+    JS::NonnullGCPtr<BrowsingContext> browsing_context = *vm.heap().allocate<BrowsingContext>(page);
 
     // 2. Let unsafeContextCreationTime be the unsafe shared current time.
     [[maybe_unused]] auto unsafe_context_creation_time = HighResolutionTime::unsafe_shared_current_time();

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

@@ -43,7 +43,7 @@ auto BrowsingContextGroup::create_a_new_browsing_context_group_and_document(JS::
 {
     // 1. Let group be a new browsing context group.
     // 2. Append group to the user agent's browsing context group set.
-    auto group = Bindings::main_thread_vm().heap().allocate_without_realm<BrowsingContextGroup>(page);
+    auto group = Bindings::main_thread_vm().heap().allocate<BrowsingContextGroup>(page);
 
     // 3. Let browsingContext and document be the result of creating a new browsing context and document with null, null, and group.
     auto [browsing_context, document] = TRY(BrowsingContext::create_a_new_browsing_context_and_document(page, nullptr, nullptr, group));

+ 1 - 1
Libraries/LibWeb/HTML/CustomElements/CustomElementRegistry.cpp

@@ -52,7 +52,7 @@ static JS::ThrowCompletionOr<JS::NonnullGCPtr<WebIDL::CallbackType>> convert_val
         return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, value.to_string_without_side_effects());
 
     // 2. Return the IDL callback function type value that represents a reference to the same object that V represents, with the incumbent settings object as the callback context.
-    return vm.heap().allocate_without_realm<WebIDL::CallbackType>(value.as_object(), HTML::incumbent_settings_object());
+    return vm.heap().allocate<WebIDL::CallbackType>(value.as_object(), HTML::incumbent_settings_object());
 }
 
 // https://webidl.spec.whatwg.org/#es-sequence

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

@@ -18,7 +18,7 @@ DocumentState::~DocumentState() = default;
 
 JS::NonnullGCPtr<DocumentState> DocumentState::clone() const
 {
-    JS::NonnullGCPtr<DocumentState> cloned = *heap().allocate_without_realm<DocumentState>();
+    JS::NonnullGCPtr<DocumentState> cloned = *heap().allocate<DocumentState>();
     cloned->m_document = m_document;
     cloned->m_history_policy_container = m_history_policy_container;
     cloned->m_request_referrer = m_request_referrer;

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

@@ -30,8 +30,8 @@ JS_DEFINE_ALLOCATOR(EventLoop);
 EventLoop::EventLoop(Type type)
     : m_type(type)
 {
-    m_task_queue = heap().allocate_without_realm<TaskQueue>(*this);
-    m_microtask_queue = heap().allocate_without_realm<TaskQueue>(*this);
+    m_task_queue = heap().allocate<TaskQueue>(*this);
+    m_microtask_queue = heap().allocate<TaskQueue>(*this);
 
     m_rendering_task_function = JS::create_heap_function(heap(), [this] {
         update_the_rendering();

+ 1 - 1
Libraries/LibWeb/HTML/EventLoop/Task.cpp

@@ -22,7 +22,7 @@ static IDAllocator s_unique_task_source_allocator { static_cast<int>(Task::Sourc
 
 JS::NonnullGCPtr<Task> Task::create(JS::VM& vm, Source source, JS::GCPtr<DOM::Document const> document, JS::NonnullGCPtr<JS::HeapFunction<void()>> steps)
 {
-    return vm.heap().allocate_without_realm<Task>(source, document, move(steps));
+    return vm.heap().allocate<Task>(source, document, move(steps));
 }
 
 Task::Task(Source source, JS::GCPtr<DOM::Document const> document, JS::NonnullGCPtr<JS::HeapFunction<void()>> steps)

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

@@ -31,7 +31,7 @@ void HTMLAudioElement::initialize(JS::Realm& realm)
 
 JS::GCPtr<Layout::Node> HTMLAudioElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::AudioBox>(document(), *this, move(style));
+    return heap().allocate<Layout::AudioBox>(document(), *this, move(style));
 }
 
 void HTMLAudioElement::adjust_computed_style(CSS::StyleProperties& style)

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

@@ -29,7 +29,7 @@ void HTMLBRElement::initialize(JS::Realm& realm)
 
 JS::GCPtr<Layout::Node> HTMLBRElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::BreakNode>(document(), *this, move(style));
+    return heap().allocate<Layout::BreakNode>(document(), *this, move(style));
 }
 
 void HTMLBRElement::adjust_computed_style(CSS::StyleProperties& style)

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

@@ -132,7 +132,7 @@ WebIDL::ExceptionOr<void> HTMLCanvasElement::set_height(unsigned value)
 
 JS::GCPtr<Layout::Node> HTMLCanvasElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::CanvasBox>(document(), *this, move(style));
+    return heap().allocate<Layout::CanvasBox>(document(), *this, move(style));
 }
 
 void HTMLCanvasElement::adjust_computed_style(CSS::StyleProperties& style)

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

@@ -215,7 +215,7 @@ WebIDL::ExceptionOr<void> HTMLDialogElement::show_modal()
             return JS::js_undefined();
         },
         0, "", &realm());
-    auto cancel_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*cancel_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+    auto cancel_callback = realm().heap().allocate<WebIDL::CallbackType>(*cancel_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
     m_close_watcher->add_event_listener_without_options(HTML::EventNames::cancel, DOM::IDLEventListener::create(realm(), cancel_callback));
     // - closeAction being to close the dialog given this and null.
     auto close_callback_function = JS::NativeFunction::create(
@@ -225,7 +225,7 @@ WebIDL::ExceptionOr<void> HTMLDialogElement::show_modal()
             return JS::js_undefined();
         },
         0, "", &realm());
-    auto close_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*close_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+    auto close_callback = realm().heap().allocate<WebIDL::CallbackType>(*close_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
     m_close_watcher->add_event_listener_without_options(HTML::EventNames::close, DOM::IDLEventListener::create(realm(), close_callback));
 
     // FIXME: 16. Set this's previously focused element to the focused element.

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

@@ -35,7 +35,7 @@ void HTMLIFrameElement::initialize(JS::Realm& realm)
 
 JS::GCPtr<Layout::Node> HTMLIFrameElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::FrameBox>(document(), *this, move(style));
+    return heap().allocate<Layout::FrameBox>(document(), *this, move(style));
 }
 
 void HTMLIFrameElement::adjust_computed_style(CSS::StyleProperties& style)

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

@@ -114,7 +114,7 @@ void HTMLImageElement::form_associated_element_attribute_changed(FlyString const
 
 JS::GCPtr<Layout::Node> HTMLImageElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::ImageBox>(document(), *this, move(style), *this);
+    return heap().allocate<Layout::ImageBox>(document(), *this, move(style), *this);
 }
 
 void HTMLImageElement::adjust_computed_style(CSS::StyleProperties& style)

+ 13 - 13
Libraries/LibWeb/HTML/HTMLInputElement.cpp

@@ -106,7 +106,7 @@ JS::GCPtr<Layout::Node> HTMLInputElement::create_layout_node(CSS::StylePropertie
     // NOTE: Image inputs are `appearance: none` per the default UA style,
     //       but we still need to create an ImageBox for them, or no image will get loaded.
     if (type_state() == TypeAttributeState::ImageButton) {
-        return heap().allocate_without_realm<Layout::ImageBox>(document(), *this, move(style), *this);
+        return heap().allocate<Layout::ImageBox>(document(), *this, move(style), *this);
     }
 
     // https://drafts.csswg.org/css-ui/#appearance-switching
@@ -118,13 +118,13 @@ JS::GCPtr<Layout::Node> HTMLInputElement::create_layout_node(CSS::StylePropertie
     }
 
     if (type_state() == TypeAttributeState::SubmitButton || type_state() == TypeAttributeState::Button || type_state() == TypeAttributeState::ResetButton)
-        return heap().allocate_without_realm<Layout::BlockContainer>(document(), this, move(style));
+        return heap().allocate<Layout::BlockContainer>(document(), this, move(style));
 
     if (type_state() == TypeAttributeState::Checkbox)
-        return heap().allocate_without_realm<Layout::CheckBox>(document(), *this, move(style));
+        return heap().allocate<Layout::CheckBox>(document(), *this, move(style));
 
     if (type_state() == TypeAttributeState::RadioButton)
-        return heap().allocate_without_realm<Layout::RadioButton>(document(), *this, move(style));
+        return heap().allocate<Layout::RadioButton>(document(), *this, move(style));
 
     return Element::create_layout_node_for_display_type(document(), style.display(), style, this);
 }
@@ -898,7 +898,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
                 return JS::js_undefined();
             },
             0, "", &realm());
-        auto mouseup_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mouseup_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+        auto mouseup_callback = realm().heap().allocate<WebIDL::CallbackType>(*mouseup_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
         DOM::AddEventListenerOptions mouseup_listener_options;
         mouseup_listener_options.once = true;
 
@@ -911,7 +911,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
                 return JS::js_undefined();
             },
             0, "", &realm());
-        auto step_up_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*up_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+        auto step_up_callback = realm().heap().allocate<WebIDL::CallbackType>(*up_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
         up_button->add_event_listener_without_options(UIEvents::EventNames::mousedown, DOM::IDLEventListener::create(realm(), step_up_callback));
         up_button->add_event_listener_without_options(UIEvents::EventNames::mouseup, DOM::IDLEventListener::create(realm(), mouseup_callback));
 
@@ -933,7 +933,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
                 return JS::js_undefined();
             },
             0, "", &realm());
-        auto step_down_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*down_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+        auto step_down_callback = realm().heap().allocate<WebIDL::CallbackType>(*down_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
         down_button->add_event_listener_without_options(UIEvents::EventNames::mousedown, DOM::IDLEventListener::create(realm(), step_down_callback));
         down_button->add_event_listener_without_options(UIEvents::EventNames::mouseup, DOM::IDLEventListener::create(realm(), mouseup_callback));
     }
@@ -992,7 +992,7 @@ void HTMLInputElement::create_file_input_shadow_tree()
     };
 
     auto on_button_click_function = JS::NativeFunction::create(realm, move(on_button_click), 0, "", &realm);
-    auto on_button_click_callback = realm.heap().allocate_without_realm<WebIDL::CallbackType>(on_button_click_function, Bindings::principal_host_defined_environment_settings_object(realm));
+    auto on_button_click_callback = realm.heap().allocate<WebIDL::CallbackType>(on_button_click_function, Bindings::principal_host_defined_environment_settings_object(realm));
     m_file_button->add_event_listener_without_options(UIEvents::EventNames::click, DOM::IDLEventListener::create(realm, on_button_click_callback));
 
     update_file_input_shadow_tree();
@@ -1064,7 +1064,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
             return JS::js_undefined();
         },
         0, "", &realm());
-    auto keydown_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*keydown_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+    auto keydown_callback = realm().heap().allocate<WebIDL::CallbackType>(*keydown_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
     add_event_listener_without_options(UIEvents::EventNames::keydown, DOM::IDLEventListener::create(realm(), keydown_callback));
 
     auto wheel_callback_function = JS::NativeFunction::create(
@@ -1079,7 +1079,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
             return JS::js_undefined();
         },
         0, "", &realm());
-    auto wheel_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*wheel_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+    auto wheel_callback = realm().heap().allocate<WebIDL::CallbackType>(*wheel_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
     add_event_listener_without_options(UIEvents::EventNames::wheel, DOM::IDLEventListener::create(realm(), wheel_callback));
 
     auto update_slider_by_mouse = [this](JS::VM& vm) {
@@ -1102,7 +1102,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
                     return JS::js_undefined();
                 },
                 0, "", &realm());
-            auto mousemove_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mousemove_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+            auto mousemove_callback = realm().heap().allocate<WebIDL::CallbackType>(*mousemove_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
             auto mousemove_listener = DOM::IDLEventListener::create(realm(), mousemove_callback);
             auto& window = static_cast<HTML::Window&>(relevant_global_object(*this));
             window.add_event_listener_without_options(UIEvents::EventNames::mousemove, mousemove_listener);
@@ -1114,7 +1114,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
                     return JS::js_undefined();
                 },
                 0, "", &realm());
-            auto mouseup_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mouseup_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+            auto mouseup_callback = realm().heap().allocate<WebIDL::CallbackType>(*mouseup_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
             DOM::AddEventListenerOptions mouseup_listener_options;
             mouseup_listener_options.once = true;
             window.add_event_listener(UIEvents::EventNames::mouseup, DOM::IDLEventListener::create(realm(), mouseup_callback), mouseup_listener_options);
@@ -1122,7 +1122,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
             return JS::js_undefined();
         },
         0, "", &realm());
-    auto mousedown_callback = realm().heap().allocate_without_realm<WebIDL::CallbackType>(*mousedown_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
+    auto mousedown_callback = realm().heap().allocate<WebIDL::CallbackType>(*mousedown_callback_function, Bindings::principal_host_defined_environment_settings_object(realm()));
     add_event_listener_without_options(UIEvents::EventNames::mousedown, DOM::IDLEventListener::create(realm(), mousedown_callback));
 }
 

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

@@ -29,7 +29,7 @@ void HTMLLabelElement::initialize(JS::Realm& realm)
 
 JS::GCPtr<Layout::Node> HTMLLabelElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::Label>(document(), this, move(style));
+    return heap().allocate<Layout::Label>(document(), this, move(style));
 }
 
 // https://html.spec.whatwg.org/multipage/forms.html#labeled-control

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

@@ -147,7 +147,7 @@ JS::GCPtr<Layout::Node> HTMLObjectElement::create_layout_node(CSS::StyleProperti
         return nullptr;
     case Representation::Image:
         if (image_data())
-            return heap().allocate_without_realm<Layout::ImageBox>(document(), *this, move(style), *this);
+            return heap().allocate<Layout::ImageBox>(document(), *this, move(style), *this);
         break;
     default:
         break;

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

@@ -65,7 +65,7 @@ void HTMLVideoElement::attribute_changed(FlyString const& name, Optional<String>
 
 JS::GCPtr<Layout::Node> HTMLVideoElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::VideoBox>(document(), *this, move(style));
+    return heap().allocate<Layout::VideoBox>(document(), *this, move(style));
 }
 
 void HTMLVideoElement::adjust_computed_style(CSS::StyleProperties& style)

+ 14 - 14
Libraries/LibWeb/HTML/Navigable.cpp

@@ -55,7 +55,7 @@ class ResponseHolder : public JS::Cell {
 public:
     [[nodiscard]] static JS::NonnullGCPtr<ResponseHolder> create(JS::VM& vm)
     {
-        return vm.heap().allocate_without_realm<ResponseHolder>();
+        return vm.heap().allocate<ResponseHolder>();
     }
 
     [[nodiscard]] JS::GCPtr<Fetch::Infrastructure::Response> response() const { return m_response; }
@@ -176,7 +176,7 @@ ErrorOr<void> Navigable::initialize_navigable(JS::NonnullGCPtr<DocumentState> do
     VERIFY(document_state->document());
 
     // 2. Let entry be a new session history entry, with
-    JS::NonnullGCPtr<SessionHistoryEntry> entry = *heap().allocate_without_realm<SessionHistoryEntry>();
+    JS::NonnullGCPtr<SessionHistoryEntry> entry = *heap().allocate<SessionHistoryEntry>();
     // URL: document's URL
     entry->set_url(document_state->document()->url());
     // document state: documentState
@@ -678,7 +678,7 @@ static WebIDL::ExceptionOr<JS::NonnullGCPtr<NavigationParams>> create_navigation
     //    opener policy: coop
     //    FIXME: navigation timing type: navTimingType
     //    about base URL: entry's document state's about base URL
-    auto navigation_params = vm.heap().allocate_without_realm<NavigationParams>();
+    auto navigation_params = vm.heap().allocate<NavigationParams>();
     navigation_params->id = move(navigation_id);
     navigation_params->navigable = navigable;
     navigation_params->response = response;
@@ -955,7 +955,7 @@ static WebIDL::ExceptionOr<Navigable::NavigationParamsVariant> create_navigation
         // resource: oldDocState's resource
         // ever populated: oldDocState's ever populated
         // navigable target name: oldDocState's navigable target name
-        auto new_document_state = navigable->heap().allocate_without_realm<DocumentState>();
+        auto new_document_state = navigable->heap().allocate<DocumentState>();
         new_document_state->set_history_policy_container(old_doc_state->history_policy_container());
         new_document_state->set_request_referrer(old_doc_state->request_referrer());
         new_document_state->set_request_referrer_policy(old_doc_state->request_referrer_policy());
@@ -990,7 +990,7 @@ static WebIDL::ExceptionOr<Navigable::NavigationParamsVariant> create_navigation
         // - source snapshot has transient activation: sourceSnapshotParams's has transient activation
         // - initiator origin: responseOrigin
         // FIXME: - navigation timing type: navTimingType
-        auto navigation_params = vm.heap().allocate_without_realm<NonFetchSchemeNavigationParams>();
+        auto navigation_params = vm.heap().allocate<NonFetchSchemeNavigationParams>();
         navigation_params->id = navigation_id;
         navigation_params->navigable = navigable;
         navigation_params->url = location_url.release_value().value();
@@ -1044,7 +1044,7 @@ static WebIDL::ExceptionOr<Navigable::NavigationParamsVariant> create_navigation
     //     COOP enforcement result: coopEnforcementResult
     //     FIXME: navigation timing type: navTimingType
     //     about base URL: entry's document state's about base URL
-    auto navigation_params = vm.heap().allocate_without_realm<NavigationParams>();
+    auto navigation_params = vm.heap().allocate<NavigationParams>();
     navigation_params->id = navigation_id;
     navigation_params->navigable = navigable;
     navigation_params->request = request;
@@ -1112,7 +1112,7 @@ WebIDL::ExceptionOr<void> Navigable::populate_session_history_entry_document(
             // - source snapshot has transient activation: sourceSnapshotParams's has transient activation
             // - initiator origin: entry's document state's initiator origin
             // FIXME: - navigation timing type: navTimingType
-            auto non_fetching_scheme_navigation_params = vm().heap().allocate_without_realm<NonFetchSchemeNavigationParams>();
+            auto non_fetching_scheme_navigation_params = vm().heap().allocate<NonFetchSchemeNavigationParams>();
             non_fetching_scheme_navigation_params->id = navigation_id;
             non_fetching_scheme_navigation_params->navigable = this;
             non_fetching_scheme_navigation_params->url = entry->url();
@@ -1437,7 +1437,7 @@ WebIDL::ExceptionOr<void> Navigable::navigate(NavigateParams params)
         //    initiator origin: initiatorOriginSnapshot
         //    resource: documentResource
         //    navigable target name: navigable's target name
-        JS::NonnullGCPtr<DocumentState> document_state = *heap().allocate_without_realm<DocumentState>();
+        JS::NonnullGCPtr<DocumentState> document_state = *heap().allocate<DocumentState>();
         document_state->set_request_referrer_policy(referrer_policy);
         document_state->set_initiator_origin(initiator_origin_snapshot);
         document_state->set_resource(document_resource);
@@ -1458,7 +1458,7 @@ WebIDL::ExceptionOr<void> Navigable::navigate(NavigateParams params)
         }
 
         // 6. Let historyEntry be a new session history entry, with its URL set to url and its document state set to documentState.
-        JS::NonnullGCPtr<SessionHistoryEntry> history_entry = *heap().allocate_without_realm<SessionHistoryEntry>();
+        JS::NonnullGCPtr<SessionHistoryEntry> history_entry = *heap().allocate<SessionHistoryEntry>();
         history_entry->set_url(url);
         history_entry->set_document_state(document_state);
 
@@ -1521,7 +1521,7 @@ WebIDL::ExceptionOr<void> Navigable::navigate_to_a_fragment(URL::URL const& url,
     //      document state: navigable's active session history entry's document state
     //      navigation API state: destinationNavigationAPIState
     //      scroll restoration mode: navigable's active session history entry's scroll restoration mode
-    JS::NonnullGCPtr<SessionHistoryEntry> history_entry = heap().allocate_without_realm<SessionHistoryEntry>();
+    JS::NonnullGCPtr<SessionHistoryEntry> history_entry = heap().allocate<SessionHistoryEntry>();
     history_entry->set_url(url);
     history_entry->set_document_state(active_session_history_entry()->document_state());
     history_entry->set_navigation_api_state(destination_navigation_api_state);
@@ -1668,7 +1668,7 @@ WebIDL::ExceptionOr<JS::GCPtr<DOM::Document>> Navigable::evaluate_javascript_url
     //     opener policy: coop
     // FIXME: navigation timing type: "navigate"
     //     about base URL: targetNavigable's active document's about base URL
-    auto navigation_params = vm.heap().allocate_without_realm<NavigationParams>();
+    auto navigation_params = vm.heap().allocate<NavigationParams>();
     navigation_params->id = navigation_id;
     navigation_params->navigable = this;
     navigation_params->request = {};
@@ -1734,7 +1734,7 @@ WebIDL::ExceptionOr<void> Navigable::navigate_to_a_javascript_url(URL::URL const
     //     resource: null
     //     ever populated: true
     //     navigable target name: oldDocState's navigable target name
-    JS::NonnullGCPtr<DocumentState> document_state = *heap().allocate_without_realm<DocumentState>();
+    JS::NonnullGCPtr<DocumentState> document_state = *heap().allocate<DocumentState>();
     document_state->set_document(new_document);
     document_state->set_history_policy_container(old_doc_state->history_policy_container());
     document_state->set_request_referrer(old_doc_state->request_referrer());
@@ -1748,7 +1748,7 @@ WebIDL::ExceptionOr<void> Navigable::navigate_to_a_javascript_url(URL::URL const
     // 12. Let historyEntry be a new session history entry, with
     //     URL: entryToReplace's URL
     //     document state: documentState
-    JS::NonnullGCPtr<SessionHistoryEntry> history_entry = *heap().allocate_without_realm<SessionHistoryEntry>();
+    JS::NonnullGCPtr<SessionHistoryEntry> history_entry = *heap().allocate<SessionHistoryEntry>();
     history_entry->set_url(entry_to_replace->url());
     history_entry->set_document_state(document_state);
 
@@ -1939,7 +1939,7 @@ void perform_url_and_history_update_steps(DOM::Document& document, URL::URL new_
     //      document state: activeEntry's document state
     //      scroll restoration mode: activeEntry's scroll restoration mode
     // FIXME: persisted user state: activeEntry's persisted user state
-    JS::NonnullGCPtr<SessionHistoryEntry> new_entry = document.heap().allocate_without_realm<SessionHistoryEntry>();
+    JS::NonnullGCPtr<SessionHistoryEntry> new_entry = document.heap().allocate<SessionHistoryEntry>();
     new_entry->set_url(new_url);
     new_entry->set_classic_history_api_state(serialized_data.value_or(active_entry->classic_history_api_state()));
     new_entry->set_document_state(active_entry->document_state());

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

@@ -86,7 +86,7 @@ WebIDL::ExceptionOr<void> NavigableContainer::create_new_child_navigable(JS::GCP
     //  - origin: document's origin
     //  - navigable target name: targetName
     //  - about base URL: document's about base URL
-    JS::NonnullGCPtr<DocumentState> document_state = *heap().allocate_without_realm<HTML::DocumentState>();
+    JS::NonnullGCPtr<DocumentState> document_state = *heap().allocate<HTML::DocumentState>();
     document_state->set_document(document);
     document_state->set_initiator_origin(document->origin());
     document_state->set_origin(document->origin());
@@ -95,7 +95,7 @@ WebIDL::ExceptionOr<void> NavigableContainer::create_new_child_navigable(JS::GCP
     document_state->set_about_base_url(document->about_base_url());
 
     // 7. Let navigable be a new navigable.
-    JS::NonnullGCPtr<Navigable> navigable = *heap().allocate_without_realm<Navigable>(page);
+    JS::NonnullGCPtr<Navigable> navigable = *heap().allocate<Navigable>(page);
 
     // 8. Initialize the navigable navigable given documentState and parentNavigable.
     TRY_OR_THROW_OOM(vm(), navigable->initialize_navigable(document_state, parent_navigable));

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

@@ -548,7 +548,7 @@ JS::NonnullGCPtr<NavigationAPIMethodTracker> Navigation::maybe_set_the_upcoming_
     //     comitted-to entry: null
     //     comitted promise:  committedPromise
     //     finished promise:  finishedPromise
-    auto api_method_tracker = vm.heap().allocate_without_realm<NavigationAPIMethodTracker>(
+    auto api_method_tracker = vm.heap().allocate<NavigationAPIMethodTracker>(
         /* .navigation = */ *this,
         /* .key = */ OptionalNone {},
         /* .info = */ info,
@@ -597,7 +597,7 @@ JS::NonnullGCPtr<NavigationAPIMethodTracker> Navigation::add_an_upcoming_travers
     //     comitted-to entry: null
     //     comitted promise:  committedPromise
     //     finished promise:  finishedPromise
-    auto api_method_tracker = vm.heap().allocate_without_realm<NavigationAPIMethodTracker>(
+    auto api_method_tracker = vm.heap().allocate<NavigationAPIMethodTracker>(
         /* .navigation = */ *this,
         /* .key = */ destination_key,
         /* .info = */ info,

+ 4 - 4
Libraries/LibWeb/HTML/Parser/HTMLParser.cpp

@@ -4526,21 +4526,21 @@ Vector<JS::Handle<DOM::Node>> HTMLParser::parse_html_fragment(DOM::Element& cont
 
 JS::NonnullGCPtr<HTMLParser> HTMLParser::create_for_scripting(DOM::Document& document)
 {
-    return document.heap().allocate_without_realm<HTMLParser>(document);
+    return document.heap().allocate<HTMLParser>(document);
 }
 
 JS::NonnullGCPtr<HTMLParser> HTMLParser::create_with_uncertain_encoding(DOM::Document& document, ByteBuffer const& input, Optional<MimeSniff::MimeType> maybe_mime_type)
 {
     if (document.has_encoding())
-        return document.heap().allocate_without_realm<HTMLParser>(document, input, document.encoding().value().to_byte_string());
+        return document.heap().allocate<HTMLParser>(document, input, document.encoding().value().to_byte_string());
     auto encoding = run_encoding_sniffing_algorithm(document, input, maybe_mime_type);
     dbgln_if(HTML_PARSER_DEBUG, "The encoding sniffing algorithm returned encoding '{}'", encoding);
-    return document.heap().allocate_without_realm<HTMLParser>(document, input, encoding);
+    return document.heap().allocate<HTMLParser>(document, input, encoding);
 }
 
 JS::NonnullGCPtr<HTMLParser> HTMLParser::create(DOM::Document& document, StringView input, StringView encoding)
 {
-    return document.heap().allocate_without_realm<HTMLParser>(document, input, encoding);
+    return document.heap().allocate<HTMLParser>(document, input, encoding);
 }
 
 enum class AttributeMode {

+ 1 - 1
Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp

@@ -35,7 +35,7 @@ JS::NonnullGCPtr<ClassicScript> ClassicScript::create(ByteString filename, Strin
     // 3. Let script be a new classic script that this algorithm will subsequently initialize.
     // 4. Set script's realm to realm.
     // 5. Set script's base URL to baseURL.
-    auto script = vm.heap().allocate_without_realm<ClassicScript>(move(base_url), move(filename), realm);
+    auto script = vm.heap().allocate<ClassicScript>(move(base_url), move(filename), realm);
 
     // FIXME: 6. Set script's fetch options to options.
 

+ 1 - 1
Libraries/LibWeb/HTML/Scripting/Environments.cpp

@@ -49,7 +49,7 @@ EnvironmentSettingsObject::~EnvironmentSettingsObject()
 void EnvironmentSettingsObject::initialize(JS::Realm& realm)
 {
     Base::initialize(realm);
-    m_module_map = realm.heap().allocate_without_realm<ModuleMap>();
+    m_module_map = realm.heap().allocate<ModuleMap>();
 }
 
 void EnvironmentSettingsObject::visit_edges(Cell::Visitor& visitor)

+ 1 - 1
Libraries/LibWeb/HTML/Scripting/Fetching.cpp

@@ -949,7 +949,7 @@ void fetch_descendants_of_and_link_a_module_script(JS::Realm& realm,
     }
 
     // 3. Let state be Record { [[ParseError]]: null, [[Destination]]: destination, [[PerformFetch]]: null, [[FetchClient]]: fetchClient }.
-    auto state = realm.heap().allocate_without_realm<FetchContext>(JS::js_null(), destination, nullptr, fetch_client);
+    auto state = realm.heap().allocate<FetchContext>(JS::js_null(), destination, nullptr, fetch_client);
 
     // 4. If performFetch was given, set state.[[PerformFetch]] to performFetch.
     state->perform_fetch = perform_fetch;

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

@@ -30,7 +30,7 @@ SessionHistoryEntry::SessionHistoryEntry()
 
 JS::NonnullGCPtr<SessionHistoryEntry> SessionHistoryEntry::clone() const
 {
-    JS::NonnullGCPtr<SessionHistoryEntry> entry = *heap().allocate_without_realm<SessionHistoryEntry>();
+    JS::NonnullGCPtr<SessionHistoryEntry> entry = *heap().allocate<SessionHistoryEntry>();
     entry->m_step = m_step;
     entry->m_url = m_url;
     entry->m_document_state = m_document_state->clone();

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

@@ -14,7 +14,7 @@ JS_DEFINE_ALLOCATOR(SessionHistoryTraversalQueueEntry);
 
 JS::NonnullGCPtr<SessionHistoryTraversalQueueEntry> SessionHistoryTraversalQueueEntry::create(JS::VM& vm, JS::NonnullGCPtr<JS::HeapFunction<void()>> steps, JS::GCPtr<HTML::Navigable> target_navigable)
 {
-    return vm.heap().allocate_without_realm<SessionHistoryTraversalQueueEntry>(steps, target_navigable);
+    return vm.heap().allocate<SessionHistoryTraversalQueueEntry>(steps, target_navigable);
 }
 
 void SessionHistoryTraversalQueueEntry::visit_edges(JS::Cell::Visitor& visitor)

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

@@ -16,7 +16,7 @@ JS_DEFINE_ALLOCATOR(Timer);
 JS::NonnullGCPtr<Timer> Timer::create(JS::Object& window_or_worker_global_scope, i32 milliseconds, Function<void()> callback, i32 id)
 {
     auto heap_function_callback = JS::create_heap_function(window_or_worker_global_scope.heap(), move(callback));
-    return window_or_worker_global_scope.heap().allocate_without_realm<Timer>(window_or_worker_global_scope, milliseconds, heap_function_callback, id);
+    return window_or_worker_global_scope.heap().allocate<Timer>(window_or_worker_global_scope, milliseconds, heap_function_callback, id);
 }
 
 Timer::Timer(JS::Object& window_or_worker_global_scope, i32 milliseconds, JS::NonnullGCPtr<JS::HeapFunction<void()>> callback, i32 id)

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

@@ -26,7 +26,7 @@ JS_DEFINE_ALLOCATOR(TraversableNavigable);
 
 TraversableNavigable::TraversableNavigable(JS::NonnullGCPtr<Page> page)
     : Navigable(page)
-    , m_session_history_traversal_queue(vm().heap().allocate_without_realm<SessionHistoryTraversalQueue>())
+    , m_session_history_traversal_queue(vm().heap().allocate<SessionHistoryTraversalQueue>())
 {
 #ifdef AK_OS_MACOS
     auto display_list_player_type = page->client().display_list_player_type();
@@ -94,7 +94,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<TraversableNavigable>> TraversableNavigable
     }
 
     // 4. Let documentState be a new document state, with
-    auto document_state = vm.heap().allocate_without_realm<DocumentState>();
+    auto document_state = vm.heap().allocate<DocumentState>();
 
     // document: document
     document_state->set_document(document);
@@ -112,7 +112,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<TraversableNavigable>> TraversableNavigable
     document_state->set_about_base_url(document->about_base_url());
 
     // 5. Let traversable be a new traversable navigable.
-    auto traversable = vm.heap().allocate_without_realm<TraversableNavigable>(page);
+    auto traversable = vm.heap().allocate<TraversableNavigable>(page);
 
     // 6. Initialize the navigable traversable given documentState.
     TRY_OR_THROW_OOM(vm, traversable->initialize_navigable(document_state, nullptr));
@@ -514,7 +514,7 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_
             auto target_entry = navigable->current_session_history_entry();
 
             // 3. Let changingNavigableContinuation be a changing navigable continuation state with:
-            auto changing_navigable_continuation = vm.heap().allocate_without_realm<ChangingNavigableContinuationState>();
+            auto changing_navigable_continuation = vm.heap().allocate<ChangingNavigableContinuationState>();
             changing_navigable_continuation->displayed_document = displayed_entry->document();
             changing_navigable_continuation->target_entry = target_entry;
             changing_navigable_continuation->navigable = navigable;

+ 1 - 1
Libraries/LibWeb/Layout/Node.cpp

@@ -1010,7 +1010,7 @@ bool Node::is_inline_table() const
 
 JS::NonnullGCPtr<NodeWithStyle> NodeWithStyle::create_anonymous_wrapper() const
 {
-    auto wrapper = heap().allocate_without_realm<BlockContainer>(const_cast<DOM::Document&>(document()), nullptr, computed_values().clone_inherited_values());
+    auto wrapper = heap().allocate<BlockContainer>(const_cast<DOM::Document&>(document()), nullptr, computed_values().clone_inherited_values());
     wrapper->mutable_computed_values().set_display(CSS::Display(CSS::DisplayOutside::Block, CSS::DisplayInside::Flow));
 
     // NOTE: These properties are not inherited, but we still have to propagate them to anonymous wrappers.

+ 12 - 12
Libraries/LibWeb/Layout/TreeBuilder.cpp

@@ -216,7 +216,7 @@ void TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element, CSS::Se
     // FIXME: This code actually computes style for element::marker, and shouldn't for element::pseudo::marker
     if (is<ListItemBox>(*pseudo_element_node)) {
         auto marker_style = style_computer.compute_style(element, CSS::Selector::PseudoElement::Type::Marker);
-        auto list_item_marker = document.heap().allocate_without_realm<ListItemMarkerBox>(
+        auto list_item_marker = document.heap().allocate<ListItemMarkerBox>(
             document,
             pseudo_element_node->computed_values().list_style_type(),
             pseudo_element_node->computed_values().list_style_position(),
@@ -242,7 +242,7 @@ void TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element, CSS::Se
     // FIXME: Handle images, and multiple values
     if (pseudo_element_content.type == CSS::ContentData::Type::String) {
         auto text = document.realm().create<DOM::Text>(document, pseudo_element_content.data);
-        auto text_node = document.heap().allocate_without_realm<Layout::TextNode>(document, *text);
+        auto text_node = document.heap().allocate<Layout::TextNode>(document, *text);
         text_node->set_generated_for(generated_for, element);
 
         push_parent(*pseudo_element_node);
@@ -357,9 +357,9 @@ void TreeBuilder::create_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
         // TODO: Implement changing element contents with the `content` property.
         if (context.layout_svg_mask_or_clip_path) {
             if (is<SVG::SVGMaskElement>(dom_node))
-                layout_node = document.heap().allocate_without_realm<Layout::SVGMaskBox>(document, static_cast<SVG::SVGMaskElement&>(dom_node), *style);
+                layout_node = document.heap().allocate<Layout::SVGMaskBox>(document, static_cast<SVG::SVGMaskElement&>(dom_node), *style);
             else if (is<SVG::SVGClipPathElement>(dom_node))
-                layout_node = document.heap().allocate_without_realm<Layout::SVGClipBox>(document, static_cast<SVG::SVGClipPathElement&>(dom_node), *style);
+                layout_node = document.heap().allocate<Layout::SVGClipBox>(document, static_cast<SVG::SVGClipPathElement&>(dom_node), *style);
             else
                 VERIFY_NOT_REACHED();
             // Only layout direct uses of SVG masks/clipPaths.
@@ -370,9 +370,9 @@ void TreeBuilder::create_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
     } else if (is<DOM::Document>(dom_node)) {
         style = style_computer.create_document_style();
         display = style->display();
-        layout_node = document.heap().allocate_without_realm<Layout::Viewport>(static_cast<DOM::Document&>(dom_node), *style);
+        layout_node = document.heap().allocate<Layout::Viewport>(static_cast<DOM::Document&>(dom_node), *style);
     } else if (is<DOM::Text>(dom_node)) {
-        layout_node = document.heap().allocate_without_realm<Layout::TextNode>(document, static_cast<DOM::Text&>(dom_node));
+        layout_node = document.heap().allocate<Layout::TextNode>(document, static_cast<DOM::Text&>(dom_node));
         display = CSS::Display(CSS::DisplayOutside::Inline, CSS::DisplayInside::Flow);
     }
 
@@ -430,7 +430,7 @@ void TreeBuilder::create_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
     if (is<ListItemBox>(*layout_node)) {
         auto& element = static_cast<DOM::Element&>(dom_node);
         auto marker_style = style_computer.compute_style(element, CSS::Selector::PseudoElement::Type::Marker);
-        auto list_item_marker = document.heap().allocate_without_realm<ListItemMarkerBox>(document, layout_node->computed_values().list_style_type(), layout_node->computed_values().list_style_position(), calculate_list_item_index(dom_node), marker_style);
+        auto list_item_marker = document.heap().allocate<ListItemMarkerBox>(document, layout_node->computed_values().list_style_type(), layout_node->computed_values().list_style_position(), calculate_list_item_index(dom_node), marker_style);
         static_cast<ListItemBox&>(*layout_node).set_marker(list_item_marker);
         element.set_pseudo_element_node({}, CSS::Selector::PseudoElement::Type::Marker, list_item_marker);
         layout_node->append_child(*list_item_marker);
@@ -505,10 +505,10 @@ void TreeBuilder::create_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
         mutable_flex_computed_values.set_flex_direction(CSS::FlexDirection::Column);
         mutable_flex_computed_values.set_height(CSS::Size::make_percentage(CSS::Percentage(100)));
         mutable_flex_computed_values.set_min_height(parent.computed_values().min_height());
-        auto flex_wrapper = parent.heap().template allocate_without_realm<BlockContainer>(parent.document(), nullptr, move(flex_computed_values));
+        auto flex_wrapper = parent.heap().template allocate<BlockContainer>(parent.document(), nullptr, move(flex_computed_values));
 
         auto content_box_computed_values = parent.computed_values().clone_inherited_values();
-        auto content_box_wrapper = parent.heap().template allocate_without_realm<BlockContainer>(parent.document(), nullptr, move(content_box_computed_values));
+        auto content_box_wrapper = parent.heap().template allocate<BlockContainer>(parent.document(), nullptr, move(content_box_computed_values));
         content_box_wrapper->set_children_are_inline(parent.children_are_inline());
 
         Vector<JS::Handle<Node>> sequence;
@@ -705,7 +705,7 @@ static void wrap_in_anonymous(Vector<JS::Handle<Node>>& sequence, Node* nearest_
     auto& parent = *sequence.first()->parent();
     auto computed_values = parent.computed_values().clone_inherited_values();
     static_cast<CSS::MutableComputedValues&>(*computed_values).set_display(display);
-    auto wrapper = parent.heap().template allocate_without_realm<WrapperBoxType>(parent.document(), nullptr, move(computed_values));
+    auto wrapper = parent.heap().template allocate<WrapperBoxType>(parent.document(), nullptr, move(computed_values));
     for (auto& child : sequence) {
         parent.remove_child(*child);
         wrapper->append_child(*child);
@@ -793,7 +793,7 @@ Vector<JS::Handle<Box>> TreeBuilder::generate_missing_parents(NodeWithStyle& roo
         auto wrapper_computed_values = table_box->computed_values().clone_inherited_values();
         table_box->transfer_table_box_computed_values_to_wrapper_computed_values(*wrapper_computed_values);
 
-        auto wrapper = parent.heap().allocate_without_realm<TableWrapper>(parent.document(), nullptr, move(wrapper_computed_values));
+        auto wrapper = parent.heap().allocate<TableWrapper>(parent.document(), nullptr, move(wrapper_computed_values));
 
         parent.remove_child(*table_box);
         wrapper->append_child(*table_box);
@@ -828,7 +828,7 @@ static void fixup_row(Box& row_box, TableGrid const& table_grid, size_t row_inde
         mutable_computed_values.set_display(Web::CSS::Display { CSS::DisplayInternal::TableCell });
         // Ensure that the cell (with zero content height) will have the same height as the row by setting vertical-align to middle.
         mutable_computed_values.set_vertical_align(CSS::VerticalAlign::Middle);
-        auto cell_box = row_box.heap().template allocate_without_realm<BlockContainer>(row_box.document(), nullptr, move(computed_values));
+        auto cell_box = row_box.heap().template allocate<BlockContainer>(row_box.document(), nullptr, move(computed_values));
         row_box.append_child(cell_box);
     }
 }

+ 1 - 1
Libraries/LibWeb/Page/Page.cpp

@@ -32,7 +32,7 @@ JS_DEFINE_ALLOCATOR(Page);
 
 JS::NonnullGCPtr<Page> Page::create(JS::VM& vm, JS::NonnullGCPtr<PageClient> page_client)
 {
-    return vm.heap().allocate_without_realm<Page>(page_client);
+    return vm.heap().allocate<Page>(page_client);
 }
 
 Page::Page(JS::NonnullGCPtr<PageClient> client)

+ 1 - 1
Libraries/LibWeb/Painting/AudioPaintable.cpp

@@ -21,7 +21,7 @@ JS_DEFINE_ALLOCATOR(AudioPaintable);
 
 JS::NonnullGCPtr<AudioPaintable> AudioPaintable::create(Layout::AudioBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<AudioPaintable>(layout_box);
+    return layout_box.heap().allocate<AudioPaintable>(layout_box);
 }
 
 AudioPaintable::AudioPaintable(Layout::AudioBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/CanvasPaintable.cpp

@@ -13,7 +13,7 @@ JS_DEFINE_ALLOCATOR(CanvasPaintable);
 
 JS::NonnullGCPtr<CanvasPaintable> CanvasPaintable::create(Layout::CanvasBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<CanvasPaintable>(layout_box);
+    return layout_box.heap().allocate<CanvasPaintable>(layout_box);
 }
 
 CanvasPaintable::CanvasPaintable(Layout::CanvasBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/CheckBoxPaintable.cpp

@@ -40,7 +40,7 @@ static Gfx::Path check_mark_path(Gfx::IntRect checkbox_rect)
 JS::NonnullGCPtr<CheckBoxPaintable>
 CheckBoxPaintable::create(Layout::CheckBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<CheckBoxPaintable>(layout_box);
+    return layout_box.heap().allocate<CheckBoxPaintable>(layout_box);
 }
 
 CheckBoxPaintable::CheckBoxPaintable(Layout::CheckBox const& layout_box)

+ 2 - 2
Libraries/LibWeb/Painting/ImagePaintable.cpp

@@ -20,13 +20,13 @@ JS_DEFINE_ALLOCATOR(ImagePaintable);
 
 JS::NonnullGCPtr<ImagePaintable> ImagePaintable::create(Layout::SVGImageBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<ImagePaintable>(layout_box, layout_box.dom_node(), false, String {}, true);
+    return layout_box.heap().allocate<ImagePaintable>(layout_box, layout_box.dom_node(), false, String {}, true);
 }
 
 JS::NonnullGCPtr<ImagePaintable> ImagePaintable::create(Layout::ImageBox const& layout_box)
 {
     auto alt = layout_box.dom_node().get_attribute_value(HTML::AttributeNames::alt);
-    return layout_box.heap().allocate_without_realm<ImagePaintable>(layout_box, layout_box.image_provider(), layout_box.renders_as_alt_text(), move(alt), false);
+    return layout_box.heap().allocate<ImagePaintable>(layout_box, layout_box.image_provider(), layout_box.renders_as_alt_text(), move(alt), false);
 }
 
 ImagePaintable::ImagePaintable(Layout::Box const& layout_box, Layout::ImageProvider const& image_provider, bool renders_as_alt_text, String alt_text, bool is_svg_image)

+ 1 - 1
Libraries/LibWeb/Painting/MarkerPaintable.cpp

@@ -15,7 +15,7 @@ JS_DEFINE_ALLOCATOR(MarkerPaintable);
 
 JS::NonnullGCPtr<MarkerPaintable> MarkerPaintable::create(Layout::ListItemMarkerBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<MarkerPaintable>(layout_box);
+    return layout_box.heap().allocate<MarkerPaintable>(layout_box);
 }
 
 MarkerPaintable::MarkerPaintable(Layout::ListItemMarkerBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/NestedBrowsingContextPaintable.cpp

@@ -18,7 +18,7 @@ JS_DEFINE_ALLOCATOR(NestedBrowsingContextPaintable);
 
 JS::NonnullGCPtr<NestedBrowsingContextPaintable> NestedBrowsingContextPaintable::create(Layout::FrameBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<NestedBrowsingContextPaintable>(layout_box);
+    return layout_box.heap().allocate<NestedBrowsingContextPaintable>(layout_box);
 }
 
 NestedBrowsingContextPaintable::NestedBrowsingContextPaintable(Layout::FrameBox const& layout_box)

+ 4 - 4
Libraries/LibWeb/Painting/PaintableBox.cpp

@@ -34,22 +34,22 @@ namespace Web::Painting {
 
 JS::NonnullGCPtr<PaintableWithLines> PaintableWithLines::create(Layout::BlockContainer const& block_container)
 {
-    return block_container.heap().allocate_without_realm<PaintableWithLines>(block_container);
+    return block_container.heap().allocate<PaintableWithLines>(block_container);
 }
 
 JS::NonnullGCPtr<PaintableWithLines> PaintableWithLines::create(Layout::InlineNode const& inline_node, size_t line_index)
 {
-    return inline_node.heap().allocate_without_realm<PaintableWithLines>(inline_node, line_index);
+    return inline_node.heap().allocate<PaintableWithLines>(inline_node, line_index);
 }
 
 JS::NonnullGCPtr<PaintableBox> PaintableBox::create(Layout::Box const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<PaintableBox>(layout_box);
+    return layout_box.heap().allocate<PaintableBox>(layout_box);
 }
 
 JS::NonnullGCPtr<PaintableBox> PaintableBox::create(Layout::InlineNode const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<PaintableBox>(layout_box);
+    return layout_box.heap().allocate<PaintableBox>(layout_box);
 }
 
 PaintableBox::PaintableBox(Layout::Box const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/RadioButtonPaintable.cpp

@@ -19,7 +19,7 @@ JS_DEFINE_ALLOCATOR(RadioButtonPaintable);
 
 JS::NonnullGCPtr<RadioButtonPaintable> RadioButtonPaintable::create(Layout::RadioButton const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<RadioButtonPaintable>(layout_box);
+    return layout_box.heap().allocate<RadioButtonPaintable>(layout_box);
 }
 
 RadioButtonPaintable::RadioButtonPaintable(Layout::RadioButton const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/SVGClipPaintable.cpp

@@ -12,7 +12,7 @@ JS_DEFINE_ALLOCATOR(SVGClipPaintable);
 
 JS::NonnullGCPtr<SVGClipPaintable> SVGClipPaintable::create(Layout::SVGClipBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<SVGClipPaintable>(layout_box);
+    return layout_box.heap().allocate<SVGClipPaintable>(layout_box);
 }
 
 SVGClipPaintable::SVGClipPaintable(Layout::SVGClipBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/SVGForeignObjectPaintable.cpp

@@ -13,7 +13,7 @@ JS_DEFINE_ALLOCATOR(SVGForeignObjectPaintable);
 
 JS::NonnullGCPtr<SVGForeignObjectPaintable> SVGForeignObjectPaintable::create(Layout::SVGForeignObjectBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<SVGForeignObjectPaintable>(layout_box);
+    return layout_box.heap().allocate<SVGForeignObjectPaintable>(layout_box);
 }
 
 SVGForeignObjectPaintable::SVGForeignObjectPaintable(Layout::SVGForeignObjectBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/SVGGraphicsPaintable.cpp

@@ -16,7 +16,7 @@ namespace Web::Painting {
 
 JS::NonnullGCPtr<SVGGraphicsPaintable> SVGGraphicsPaintable::create(Layout::SVGGraphicsBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<SVGGraphicsPaintable>(layout_box);
+    return layout_box.heap().allocate<SVGGraphicsPaintable>(layout_box);
 }
 
 SVGGraphicsPaintable::SVGGraphicsPaintable(Layout::SVGGraphicsBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/SVGMaskPaintable.cpp

@@ -12,7 +12,7 @@ JS_DEFINE_ALLOCATOR(SVGMaskPaintable);
 
 JS::NonnullGCPtr<SVGMaskPaintable> SVGMaskPaintable::create(Layout::SVGMaskBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<SVGMaskPaintable>(layout_box);
+    return layout_box.heap().allocate<SVGMaskPaintable>(layout_box);
 }
 
 SVGMaskPaintable::SVGMaskPaintable(Layout::SVGMaskBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/SVGPathPaintable.cpp

@@ -15,7 +15,7 @@ JS_DEFINE_ALLOCATOR(SVGPathPaintable);
 
 JS::NonnullGCPtr<SVGPathPaintable> SVGPathPaintable::create(Layout::SVGGraphicsBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<SVGPathPaintable>(layout_box);
+    return layout_box.heap().allocate<SVGPathPaintable>(layout_box);
 }
 
 SVGPathPaintable::SVGPathPaintable(Layout::SVGGraphicsBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/SVGSVGPaintable.cpp

@@ -13,7 +13,7 @@ JS_DEFINE_ALLOCATOR(SVGSVGPaintable);
 
 JS::NonnullGCPtr<SVGSVGPaintable> SVGSVGPaintable::create(Layout::SVGSVGBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<SVGSVGPaintable>(layout_box);
+    return layout_box.heap().allocate<SVGSVGPaintable>(layout_box);
 }
 
 SVGSVGPaintable::SVGSVGPaintable(Layout::SVGSVGBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/TextPaintable.cpp

@@ -16,7 +16,7 @@ JS_DEFINE_ALLOCATOR(TextPaintable);
 
 JS::NonnullGCPtr<TextPaintable> TextPaintable::create(Layout::TextNode const& layout_node, String const& text_for_rendering)
 {
-    return layout_node.heap().allocate_without_realm<TextPaintable>(layout_node, text_for_rendering);
+    return layout_node.heap().allocate<TextPaintable>(layout_node, text_for_rendering);
 }
 
 TextPaintable::TextPaintable(Layout::TextNode const& layout_node, String const& text_for_rendering)

+ 1 - 1
Libraries/LibWeb/Painting/VideoPaintable.cpp

@@ -30,7 +30,7 @@ static constexpr Gfx::Color control_button_color(bool is_hovered)
 
 JS::NonnullGCPtr<VideoPaintable> VideoPaintable::create(Layout::VideoBox const& layout_box)
 {
-    return layout_box.heap().allocate_without_realm<VideoPaintable>(layout_box);
+    return layout_box.heap().allocate<VideoPaintable>(layout_box);
 }
 
 VideoPaintable::VideoPaintable(Layout::VideoBox const& layout_box)

+ 1 - 1
Libraries/LibWeb/Painting/ViewportPaintable.cpp

@@ -18,7 +18,7 @@ JS_DEFINE_ALLOCATOR(ViewportPaintable);
 
 JS::NonnullGCPtr<ViewportPaintable> ViewportPaintable::create(Layout::Viewport const& layout_viewport)
 {
-    return layout_viewport.heap().allocate_without_realm<ViewportPaintable>(layout_viewport);
+    return layout_viewport.heap().allocate<ViewportPaintable>(layout_viewport);
 }
 
 ViewportPaintable::ViewportPaintable(Layout::Viewport const& layout_viewport)

+ 1 - 1
Libraries/LibWeb/Platform/TimerSerenity.cpp

@@ -13,7 +13,7 @@ namespace Web::Platform {
 
 JS::NonnullGCPtr<TimerSerenity> TimerSerenity::create(JS::Heap& heap)
 {
-    return heap.allocate_without_realm<TimerSerenity>();
+    return heap.allocate<TimerSerenity>();
 }
 
 TimerSerenity::TimerSerenity()

+ 1 - 1
Libraries/LibWeb/SVG/SVGAElement.cpp

@@ -64,7 +64,7 @@ JS::NonnullGCPtr<DOM::DOMTokenList> SVGAElement::rel_list()
 
 JS::GCPtr<Layout::Node> SVGAElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));
+    return heap().allocate<Layout::SVGGraphicsBox>(document(), *this, move(style));
 }
 
 }

+ 1 - 1
Libraries/LibWeb/SVG/SVGDecodedImageData.cpp

@@ -35,7 +35,7 @@ ErrorOr<JS::NonnullGCPtr<SVGDecodedImageData>> SVGDecodedImageData::create(JS::R
     JS::NonnullGCPtr<HTML::Navigable> navigable = page->top_level_traversable();
     auto response = Fetch::Infrastructure::Response::create(navigable->vm());
     response->url_list().append(url);
-    auto navigation_params = navigable->heap().allocate_without_realm<HTML::NavigationParams>();
+    auto navigation_params = navigable->heap().allocate<HTML::NavigationParams>();
     navigation_params->navigable = navigable;
     navigation_params->response = response;
     navigation_params->origin = URL::Origin {};

+ 1 - 1
Libraries/LibWeb/SVG/SVGDecodedImageData.h

@@ -58,7 +58,7 @@ class SVGDecodedImageData::SVGPageClient final : public PageClient {
 public:
     static JS::NonnullGCPtr<SVGPageClient> create(JS::VM& vm, Page& page)
     {
-        return vm.heap().allocate_without_realm<SVGPageClient>(page);
+        return vm.heap().allocate<SVGPageClient>(page);
     }
 
     virtual ~SVGPageClient() override = default;

+ 1 - 1
Libraries/LibWeb/SVG/SVGForeignObjectElement.cpp

@@ -49,7 +49,7 @@ void SVGForeignObjectElement::visit_edges(Cell::Visitor& visitor)
 
 JS::GCPtr<Layout::Node> SVGForeignObjectElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::SVGForeignObjectBox>(document(), *this, move(style));
+    return heap().allocate<Layout::SVGForeignObjectBox>(document(), *this, move(style));
 }
 
 void SVGForeignObjectElement::apply_presentational_hints(CSS::StyleProperties& style) const

+ 1 - 1
Libraries/LibWeb/SVG/SVGGElement.cpp

@@ -28,7 +28,7 @@ void SVGGElement::initialize(JS::Realm& realm)
 
 JS::GCPtr<Layout::Node> SVGGElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));
+    return heap().allocate<Layout::SVGGraphicsBox>(document(), *this, move(style));
 }
 
 }

+ 1 - 1
Libraries/LibWeb/SVG/SVGGeometryElement.cpp

@@ -24,7 +24,7 @@ void SVGGeometryElement::initialize(JS::Realm& realm)
 
 JS::GCPtr<Layout::Node> SVGGeometryElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::SVGGeometryBox>(document(), *this, move(style));
+    return heap().allocate<Layout::SVGGeometryBox>(document(), *this, move(style));
 }
 
 float SVGGeometryElement::get_total_length()

+ 1 - 1
Libraries/LibWeb/SVG/SVGImageElement.cpp

@@ -180,7 +180,7 @@ void SVGImageElement::fetch_the_document(URL::URL const& url)
 
 JS::GCPtr<Layout::Node> SVGImageElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::SVGImageBox>(document(), *this, move(style));
+    return heap().allocate<Layout::SVGImageBox>(document(), *this, move(style));
 }
 
 bool SVGImageElement::is_image_available() const

+ 1 - 1
Libraries/LibWeb/SVG/SVGSVGElement.cpp

@@ -44,7 +44,7 @@ void SVGSVGElement::visit_edges(Visitor& visitor)
 
 JS::GCPtr<Layout::Node> SVGSVGElement::create_layout_node(CSS::StyleProperties style)
 {
-    return heap().allocate_without_realm<Layout::SVGSVGBox>(document(), *this, move(style));
+    return heap().allocate<Layout::SVGSVGBox>(document(), *this, move(style));
 }
 
 RefPtr<CSS::CSSStyleValue> SVGSVGElement::width_style_value_from_attribute() const

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini