Backed out changeset 5c7dda18ec02 (bug 1285897)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 21 Jul 2016 08:03:10 +0200
changeset 306023 fab0848f52e72b34ce47303ee8146c3efad6b8b7
parent 306022 00833f7ba1348a0aefd3147ef9941978393f0703
child 306024 e9e32ccc8cfbcc802f41f67c80938a50b7ce1a65
push id30474
push usercbook@mozilla.com
push dateThu, 21 Jul 2016 14:25:10 +0000
treeherdermozilla-central@6b180266ac16 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1285897
milestone50.0a1
backs out5c7dda18ec0299ffd4059624eca09338e5124116
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
Backed out changeset 5c7dda18ec02 (bug 1285897)
dom/html/TextTrackManager.cpp
dom/media/TextTrack.cpp
dom/media/TextTrack.h
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -735,17 +735,17 @@ TextTrackManager::TimeMarchesOn()
   for (uint32_t i = 0; i < eventList.Length(); ++i) {
     NS_DispatchToMainThread(eventList[i].forget());
   }
 
   // Step 16.
   for (uint32_t i = 0; i < affectedTracks.Length(); ++i) {
     TextTrack* ttrack = affectedTracks[i];
     if (ttrack) {
-      ttrack->DispatchAsyncTrustedEvent(NS_LITERAL_STRING("cuechange"));
+      ttrack->DispatchTrustedEvent(NS_LITERAL_STRING("cuechange"));
       HTMLTrackElement* trackElement = ttrack->GetTrackElement();
       if (trackElement) {
         trackElement->DispatchTrackRunnable(NS_LITERAL_STRING("cuechange"));
       }
     }
   }
 
   mLastTimeMarchesOnCalled = currentPlaybackTime;
--- a/dom/media/TextTrack.cpp
+++ b/dom/media/TextTrack.cpp
@@ -313,21 +313,10 @@ TextTrack::GetLanguage(nsAString& aLangu
 {
   if (mTrackElement) {
     mTrackElement->GetSrclang(aLanguage);
   } else {
     aLanguage = mLanguage;
   }
 }
 
-void
-TextTrack::DispatchAsyncTrustedEvent(const nsString& aEventName)
-{
-  RefPtr<TextTrack> self = this;
-  NS_DispatchToMainThread(
-    NS_NewRunnableFunction([self, aEventName]() {
-      self->DispatchTrustedEvent(aEventName);
-    })
-  );
-}
-
 } // namespace dom
 } // namespace mozilla
--- a/dom/media/TextTrack.h
+++ b/dom/media/TextTrack.h
@@ -111,18 +111,16 @@ public:
   TextTrackSource GetTextTrackSource() {
     return mTextTrackSource;
   }
 
   void SetCuesInactive();
 
   void NotifyCueUpdated(TextTrackCue *aCue);
 
-  void DispatchAsyncTrustedEvent(const nsString& aEventName);
-
 private:
   ~TextTrack();
 
   RefPtr<TextTrackList> mTextTrackList;
 
   TextTrackKind mKind;
   nsString mLabel;
   nsString mLanguage;