mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:57:35 +00:00
LibWeb/LibJS: Avoid GC visit of raw pointers where possible
This is mostly motivated for aesthetics, but also helps avoid some null checks when we have a NonnullGCPtr<T> or in some cases a T&.
This commit is contained in:
parent
4e04f81626
commit
6a2a7cad61
54 changed files with 100 additions and 100 deletions
|
@ -67,10 +67,10 @@ void EventTarget::visit_edges(Cell::Visitor& visitor)
|
|||
Base::visit_edges(visitor);
|
||||
|
||||
for (auto& event_listener : m_event_listener_list)
|
||||
visitor.visit(event_listener.ptr());
|
||||
visitor.visit(event_listener);
|
||||
|
||||
for (auto& it : m_event_handler_map)
|
||||
visitor.visit(it.value.ptr());
|
||||
visitor.visit(it.value);
|
||||
}
|
||||
|
||||
Vector<JS::Handle<DOMEventListener>> EventTarget::event_listener_list()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue