LibWeb: Make module maps GC-allocated

This allows them to mark JS modules, and fixes a crash seen on
https://shopify.com/
This commit is contained in:
Andreas Kling 2023-05-04 09:49:56 +02:00
parent 853ecb8d8e
commit 3811be2f7c
Notes: sideshowbarker 2024-07-17 18:23:22 +09:00
4 changed files with 24 additions and 4 deletions

View file

@ -8,6 +8,14 @@
namespace Web::HTML {
void ModuleMap::visit_edges(Visitor& visitor)
{
Base::visit_edges(visitor);
for (auto& it : m_values) {
visitor.visit(it.value.module_script);
}
}
bool ModuleMap::is_fetching(AK::URL const& url, DeprecatedString const& type) const
{
return is(url, type, EntryType::Fetching);