From 3deb8e322fe761b5ec3950f960e0e74370e711d9 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 10 Jan 2023 07:03:26 -0500 Subject: [PATCH] LibWeb: Remove Intrinsics::cached_web_prototype It's now unused, and won't be safe to use once Web constructors and prototypes are lazily created. --- Userland/Libraries/LibWeb/Bindings/Intrinsics.cpp | 10 ---------- Userland/Libraries/LibWeb/Bindings/Intrinsics.h | 7 ------- 2 files changed, 17 deletions(-) diff --git a/Userland/Libraries/LibWeb/Bindings/Intrinsics.cpp b/Userland/Libraries/LibWeb/Bindings/Intrinsics.cpp index 23f33f1bbc..bb8798059f 100644 --- a/Userland/Libraries/LibWeb/Bindings/Intrinsics.cpp +++ b/Userland/Libraries/LibWeb/Bindings/Intrinsics.cpp @@ -13,16 +13,6 @@ namespace Web::Bindings { -JS::Object& Intrinsics::cached_web_prototype(DeprecatedString const& class_name) -{ - auto it = m_prototypes.find(class_name); - if (it == m_prototypes.end()) { - dbgln("Missing prototype: {}", class_name); - } - VERIFY(it != m_prototypes.end()); - return *it->value; -} - void Intrinsics::visit_edges(JS::Cell::Visitor& visitor) { Base::visit_edges(visitor); diff --git a/Userland/Libraries/LibWeb/Bindings/Intrinsics.h b/Userland/Libraries/LibWeb/Bindings/Intrinsics.h index 012278c402..67b20512d5 100644 --- a/Userland/Libraries/LibWeb/Bindings/Intrinsics.h +++ b/Userland/Libraries/LibWeb/Bindings/Intrinsics.h @@ -25,8 +25,6 @@ public: { } - JS::Object& cached_web_prototype(DeprecatedString const& class_name); - template JS::Object& ensure_web_prototype(DeprecatedString const& class_name) { @@ -75,9 +73,4 @@ template return host_defined_intrinsics(realm).ensure_web_constructor(class_name); } -[[nodiscard]] inline JS::Object& cached_web_prototype(JS::Realm& realm, DeprecatedString const& class_name) -{ - return host_defined_intrinsics(realm).cached_web_prototype(class_name); -} - }