Bug 1855369 - log underlying track when it exists;r=pehrsons

Differential Revision: https://phabricator.services.mozilla.com/D189548
This commit is contained in:
Nico Grunbaum 2023-10-03 19:13:23 +00:00
Родитель 7897c88c9e
Коммит 49558158fa
1 изменённых файлов: 10 добавлений и 2 удалений

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

@ -334,8 +334,16 @@ void DOMMediaStream::AddTrack(MediaStreamTrack& aTrack) {
} }
void DOMMediaStream::RemoveTrack(MediaStreamTrack& aTrack) { void DOMMediaStream::RemoveTrack(MediaStreamTrack& aTrack) {
LOG(LogLevel::Info, ("DOMMediaStream %p Removing track %p (from track %p)", if (static_cast<LogModule*>(gMediaStreamLog)->ShouldLog(LogLevel::Info)) {
this, &aTrack, aTrack.GetTrack())); if (aTrack.Ended()) {
LOG(LogLevel::Info,
("DOMMediaStream %p Removing (ended) track %p", this, &aTrack));
} else {
LOG(LogLevel::Info,
("DOMMediaStream %p Removing track %p (from track %p)", this, &aTrack,
aTrack.GetTrack()));
}
}
if (!mTracks.RemoveElement(&aTrack)) { if (!mTracks.RemoveElement(&aTrack)) {
LOG(LogLevel::Debug, LOG(LogLevel::Debug,