mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibJS+LibWeb: Add missing visit calls in visit_edges implementations
This commit is contained in:
parent
a3344cab63
commit
39d8c8d2a9
Notes:
sideshowbarker
2024-07-17 08:59:18 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/39d8c8d2a9 Pull-request: https://github.com/SerenityOS/serenity/pull/17979 Reviewed-by: https://github.com/awesomekling
8 changed files with 49 additions and 25 deletions
|
@ -25,7 +25,8 @@ void CyclicModule::visit_edges(Cell::Visitor& visitor)
|
|||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_cycle_root);
|
||||
for (auto module : m_async_parent_modules)
|
||||
visitor.visit(m_top_level_capability);
|
||||
for (auto const& module : m_async_parent_modules)
|
||||
visitor.visit(module);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ ThrowCompletionOr<void> AsyncFromSyncIterator::initialize(Realm& realm)
|
|||
|
||||
void AsyncFromSyncIterator::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Object::visit_edges(visitor);
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_sync_iterator_record.iterator);
|
||||
visitor.visit(m_sync_iterator_record.next_method);
|
||||
}
|
||||
|
|
|
@ -355,6 +355,17 @@ void Intrinsics::visit_edges(Visitor& visitor)
|
|||
visitor.visit(m_async_generator_prototype);
|
||||
visitor.visit(m_generator_prototype);
|
||||
visitor.visit(m_intl_segments_prototype);
|
||||
visitor.visit(m_eval_function);
|
||||
visitor.visit(m_is_finite_function);
|
||||
visitor.visit(m_is_nan_function);
|
||||
visitor.visit(m_parse_float_function);
|
||||
visitor.visit(m_parse_int_function);
|
||||
visitor.visit(m_decode_uri_function);
|
||||
visitor.visit(m_decode_uri_component_function);
|
||||
visitor.visit(m_encode_uri_function);
|
||||
visitor.visit(m_encode_uri_component_function);
|
||||
visitor.visit(m_escape_function);
|
||||
visitor.visit(m_unescape_function);
|
||||
visitor.visit(m_array_prototype_values_function);
|
||||
visitor.visit(m_date_constructor_now_function);
|
||||
visitor.visit(m_eval_function);
|
||||
|
|
|
@ -16,10 +16,13 @@ void Intrinsics::visit_edges(JS::Cell::Visitor& visitor)
|
|||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
||||
for (auto& it : m_namespaces)
|
||||
visitor.visit(it.value);
|
||||
for (auto& it : m_prototypes)
|
||||
visitor.visit(it.value);
|
||||
for (auto& it : m_constructors)
|
||||
visitor.visit(it.value);
|
||||
visitor.visit(m_realm);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -74,9 +74,9 @@ void AccessibilityTreeNode::serialize_tree_as_json(JsonObjectSerializer<StringBu
|
|||
void AccessibilityTreeNode::visit_edges(Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(value());
|
||||
for (auto child : children())
|
||||
child->visit_edges(visitor);
|
||||
visitor.visit(m_value);
|
||||
for (auto const& child : m_children)
|
||||
visitor.visit(child);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -334,19 +334,20 @@ JS::ThrowCompletionOr<void> Document::initialize(JS::Realm& realm)
|
|||
void Document::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_window.ptr());
|
||||
visitor.visit(m_style_sheets.ptr());
|
||||
visitor.visit(m_hovered_node.ptr());
|
||||
visitor.visit(m_inspected_node.ptr());
|
||||
visitor.visit(m_active_favicon.ptr());
|
||||
visitor.visit(m_focused_element.ptr());
|
||||
visitor.visit(m_active_element.ptr());
|
||||
visitor.visit(m_implementation.ptr());
|
||||
visitor.visit(m_current_script.ptr());
|
||||
visitor.visit(m_associated_inert_template_document.ptr());
|
||||
visitor.visit(m_window);
|
||||
visitor.visit(m_layout_root);
|
||||
visitor.visit(m_style_sheets);
|
||||
visitor.visit(m_hovered_node);
|
||||
visitor.visit(m_inspected_node);
|
||||
visitor.visit(m_active_favicon);
|
||||
visitor.visit(m_focused_element);
|
||||
visitor.visit(m_active_element);
|
||||
visitor.visit(m_implementation);
|
||||
visitor.visit(m_current_script);
|
||||
visitor.visit(m_associated_inert_template_document);
|
||||
visitor.visit(m_appropriate_template_contents_owner_document);
|
||||
visitor.visit(m_pending_parsing_blocking_script.ptr());
|
||||
visitor.visit(m_history.ptr());
|
||||
visitor.visit(m_pending_parsing_blocking_script);
|
||||
visitor.visit(m_history);
|
||||
|
||||
visitor.visit(m_browsing_context);
|
||||
|
||||
|
@ -363,17 +364,17 @@ void Document::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_parser);
|
||||
|
||||
for (auto& script : m_scripts_to_execute_when_parsing_has_finished)
|
||||
visitor.visit(script.ptr());
|
||||
visitor.visit(script);
|
||||
for (auto& script : m_scripts_to_execute_as_soon_as_possible)
|
||||
visitor.visit(script.ptr());
|
||||
visitor.visit(script);
|
||||
|
||||
for (auto& node_iterator : m_node_iterators)
|
||||
visitor.visit(node_iterator);
|
||||
|
||||
for (auto& target : m_pending_scroll_event_targets)
|
||||
visitor.visit(target.ptr());
|
||||
visitor.visit(target);
|
||||
for (auto& target : m_pending_scrollend_event_targets)
|
||||
visitor.visit(target.ptr());
|
||||
visitor.visit(target);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/selection-api/#dom-document-getselection
|
||||
|
|
|
@ -22,7 +22,14 @@ void Request::visit_edges(JS::Cell::Visitor& visitor)
|
|||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_header_list);
|
||||
for (auto pending_response : m_pending_responses)
|
||||
visitor.visit(m_client);
|
||||
m_reserved_client.visit(
|
||||
[&](JS::GCPtr<HTML::EnvironmentSettingsObject> const& value) { visitor.visit(value); },
|
||||
[](auto const&) {});
|
||||
m_window.visit(
|
||||
[&](JS::GCPtr<HTML::EnvironmentSettingsObject> const& value) { visitor.visit(value); },
|
||||
[](auto const&) {});
|
||||
for (auto const& pending_response : m_pending_responses)
|
||||
visitor.visit(pending_response);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,9 +40,10 @@ JS::ThrowCompletionOr<void> Worker::initialize(JS::Realm& realm)
|
|||
void Worker::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_document.ptr());
|
||||
visitor.visit(m_implicit_port.ptr());
|
||||
visitor.visit(m_outside_port.ptr());
|
||||
visitor.visit(m_document);
|
||||
visitor.visit(m_inner_settings);
|
||||
visitor.visit(m_implicit_port);
|
||||
visitor.visit(m_outside_port);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dom-worker
|
||||
|
|
Loading…
Reference in a new issue