Bug 1559568 - Make DOMMediaStream support WeakPtr. r=jya

As required by the next patch to avoid strong refs to DOMMediaStream in
OutputStreamManager.

Differential Revision: https://phabricator.services.mozilla.com/D36569

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Pehrson 2019-07-03 09:09:40 +00:00
Родитель 536807149d
Коммит 028862e84c
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -171,7 +171,8 @@ class OverlayImage;
class DOMMediaStream
: public DOMEventTargetHelper,
public dom::PrincipalChangeObserver<dom::MediaStreamTrack>,
public RelativeTimeline {
public RelativeTimeline,
public SupportsWeakPtr<DOMMediaStream> {
friend class dom::MediaStreamTrack;
typedef dom::MediaStreamTrack MediaStreamTrack;
typedef dom::AudioStreamTrack AudioStreamTrack;
@ -185,6 +186,8 @@ class DOMMediaStream
public:
typedef dom::MediaTrackConstraints MediaTrackConstraints;
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(DOMMediaStream)
class TrackListener {
public:
virtual ~TrackListener() {}