From c68148efc5b0cdcfee4e82b1cf3a1b4ade4545c0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 23 Jan 2021 19:02:02 +0100 Subject: [PATCH] LibWeb: Remove Range constructor/prototype caches from WindowObject These are constructed on the code generator path now instead. --- Userland/Libraries/LibWeb/Bindings/WindowObject.cpp | 6 ------ Userland/Libraries/LibWeb/Bindings/WindowObject.h | 6 ------ 2 files changed, 12 deletions(-) diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp index 3fbb80bcbf..4c9796eca6 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp @@ -92,9 +92,6 @@ void WindowObject::initialize() define_property("location", heap().allocate(*this, *this), JS::Attribute::Enumerable | JS::Attribute::Configurable); ADD_WINDOW_OBJECT_INTERFACES; - - m_range_prototype = heap().allocate(*this, *this); - add_constructor("Range", m_range_constructor, m_range_prototype); } WindowObject::~WindowObject() @@ -104,9 +101,6 @@ WindowObject::~WindowObject() void WindowObject::visit_edges(Visitor& visitor) { GlobalObject::visit_edges(visitor); - visitor.visit(m_range_constructor); - visitor.visit(m_range_prototype); - for (auto& it : m_prototypes) visitor.visit(it.value); for (auto& it : m_constructors) diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.h b/Userland/Libraries/LibWeb/Bindings/WindowObject.h index fe71e7950b..be565d344c 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.h +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.h @@ -47,9 +47,6 @@ public: Origin origin() const; - RangePrototype* range_prototype() { return m_range_prototype; } - RangeConstructor* range_constructor() { return m_range_constructor; } - JS::Object* web_prototype(const String& class_name) { return m_prototypes.get(class_name).value_or(nullptr); } JS::NativeFunction* web_constructor(const String& class_name) { return m_constructors.get(class_name).value_or(nullptr); } @@ -100,9 +97,6 @@ private: NonnullRefPtr m_impl; - RangePrototype* m_range_prototype { nullptr }; - RangeConstructor* m_range_constructor { nullptr }; - HashMap m_prototypes; HashMap m_constructors; };