Skip to content

Commit

Permalink
LibWeb: Use NonnullGCPtr in EventTarget's event handler map
Browse files Browse the repository at this point in the history
Null entries are not valid, so let's not allow them.
  • Loading branch information
awesomekling committed Mar 11, 2024
1 parent 99ca2cc commit 7139d59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/DOM/EventTarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class EventTarget : public Bindings::PlatformObject {

// 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();
Expand Down

0 comments on commit 7139d59

Please sign in to comment.