Skip to content

Commit

Permalink
LibWeb: Visit the DataTransfer member of DragEvent
Browse files Browse the repository at this point in the history
(cherry picked from commit b73bd76571a5be1d41eb667193cab2972604f58c)
  • Loading branch information
ADKaster authored and nico committed Nov 1, 2024
1 parent 5182ada commit 425b1be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Userland/Libraries/LibWeb/HTML/DragEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ void DragEvent::initialize(JS::Realm& realm)
WEB_SET_PROTOTYPE_FOR_INTERFACE(DragEvent);
}

void DragEvent::visit_edges(JS::Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_data_transfer);
}

}
1 change: 1 addition & 0 deletions Userland/Libraries/LibWeb/HTML/DragEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class DragEvent : public UIEvents::MouseEvent {
DragEvent(JS::Realm&, FlyString const& event_name, DragEventInit const& event_init, double page_x, double page_y, double offset_x, double offset_y);

virtual void initialize(JS::Realm&) override;
virtual void visit_edges(JS::Cell::Visitor&) override;

JS::GCPtr<DataTransfer> m_data_transfer;
};
Expand Down

0 comments on commit 425b1be

Please sign in to comment.