Bug 1172394 - Don't remove dom::MediaTracks on chained metadata updates. r=padenot
authorAndreas Pehrson <apehrson@mozilla.com>
Wed, 13 Nov 2019 22:39:46 +0000
changeset 501951 e20ee1ce7ce5a7fd144cedbb051c3858d9f91550
parent 501950 5b466cf155f9df1f059731abc615cf775e6a5ca0
child 501952 8e45c51fc6cfe95e6cdb8d54bf635d8a5751c06e
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1172394
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1172394 - Don't remove dom::MediaTracks on chained metadata updates. r=padenot HTMLMediaElement avoid creating new tracks in MetadataLoaded when it has already created some, so there should be no side effect to this patch. Differential Revision: https://phabricator.services.mozilla.com/D52037
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -637,17 +637,16 @@ double MediaDecoder::GetCurrentTime() {
   MOZ_ASSERT(NS_IsMainThread());
   AbstractThread::AutoEnter context(AbstractMainThread());
   return mLogicalPosition;
 }
 
 void MediaDecoder::OnMetadataUpdate(TimedMetadata&& aMetadata) {
   MOZ_ASSERT(NS_IsMainThread());
   AbstractThread::AutoEnter context(AbstractMainThread());
-  GetOwner()->RemoveMediaTracks();
   MetadataLoaded(MakeUnique<MediaInfo>(*aMetadata.mInfo),
                  UniquePtr<MetadataTags>(std::move(aMetadata.mTags)),
                  MediaDecoderEventVisibility::Observable);
   FirstFrameLoaded(std::move(aMetadata.mInfo),
                    MediaDecoderEventVisibility::Observable);
 }
 
 void MediaDecoder::MetadataLoaded(