Bug 1294605 - Notify MediaStreamTrackSource when track is notified of ended on main thread. r=jib

I haven't seen test failures from this but I imagine there could be.

MozReview-Commit-ID: 8iyMBzQCWeA
This commit is contained in:
Andreas Pehrson 2016-08-29 16:34:27 +02:00
Родитель c4eee3e2b8
Коммит ee3f88eec2
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -398,6 +398,13 @@ MediaStreamTrack::NotifyEnded()
LOG(LogLevel::Info, ("MediaStreamTrack %p ended", this));
if (!mSource) {
MOZ_ASSERT(false);
return;
}
mSource->UnregisterSink(this);
mReadyState = MediaStreamTrackState::Ended;
DispatchTrustedEvent(NS_LITERAL_STRING("ended"));