LibWeb: Use NonnullGCPtr in EventTarget's event handler map

Null entries are not valid, so let's not allow them.
This commit is contained in:
Andreas Kling 2024-03-09 20:58:01 +01:00
parent 99ca2ccf08
commit 7139d5945f
Notes: sideshowbarker 2024-07-17 06:35:16 +09:00

View file

@ -73,7 +73,7 @@ private:
// https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-map
// Spec Note: The order of the entries of event handler map could be arbitrary. It is not observable through any algorithms that operate on the map.
HashMap<FlyString, JS::GCPtr<HTML::EventHandler>> event_handler_map;
HashMap<FlyString, JS::NonnullGCPtr<HTML::EventHandler>> event_handler_map;
};
Data& ensure_data();