mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
LibWeb: Do not return a GC::Root from HTMLTrackElement's track getter
There's no need to create a root each time the getter is called. We should also allocate it in the `initialize` overload rather than the constructor.
This commit is contained in:
Notes:
github-actions[bot]
2025-06-12 16:27:10 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/c6a94fe5131 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5068 Reviewed-by: https://github.com/tcl3
@@ -21,7 +21,7 @@ public:
|
||||
|
||||
WebIDL::UnsignedShort ready_state();
|
||||
|
||||
GC::Root<TextTrack> track() { return m_track; }
|
||||
GC::Ref<TextTrack> track() { return *m_track; }
|
||||
|
||||
private:
|
||||
HTMLTrackElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
Reference in New Issue
Block a user