diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/media/DOMMediaStream.h | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/DOMMediaStream.h')
-rw-r--r-- | dom/media/DOMMediaStream.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dom/media/DOMMediaStream.h b/dom/media/DOMMediaStream.h index b0a9f895bb..bfce7b65f0 100644 --- a/dom/media/DOMMediaStream.h +++ b/dom/media/DOMMediaStream.h @@ -59,9 +59,10 @@ class DOMMediaStream : public DOMEventTargetHelper, public: typedef dom::MediaTrackConstraints MediaTrackConstraints; - class TrackListener { + class TrackListener : public nsISupports { public: - virtual ~TrackListener() = default; + NS_DECL_CYCLE_COLLECTING_ISUPPORTS + NS_DECL_CYCLE_COLLECTION_CLASS(TrackListener) /** * Called when the DOMMediaStream has a live track added, either by @@ -94,6 +95,9 @@ class DOMMediaStream : public DOMEventTargetHelper, * Called when the DOMMediaStream has become inaudible. */ virtual void NotifyInaudible(){}; + + protected: + virtual ~TrackListener() = default; }; explicit DOMMediaStream(nsPIDOMWindowInner* aWindow); @@ -236,7 +240,7 @@ class DOMMediaStream : public DOMEventTargetHelper, nsTArray<nsCOMPtr<nsISupports>> mConsumersToKeepAlive; // The track listeners subscribe to changes in this stream's track set. - nsTArray<TrackListener*> mTrackListeners; + nsTArray<RefPtr<TrackListener>> mTrackListeners; // True if this stream has live tracks. bool mActive = false; |