Bug 1378631. P3 - remove dead code. draft
authorJW Wang <jwwang@mozilla.com>
Thu, 06 Jul 2017 11:45:02 +0800
changeset 606086 ef96da4d7791f2197eff3010b75b1e39eafba500
parent 606085 9e5ab9f0ec1bd4536fe157dd530b374a791c600b
child 636674 d29604c099500f494e1a18f2e65cdb1ca32e99de
push id67603
push userjwwang@mozilla.com
push dateMon, 10 Jul 2017 09:52:59 +0000
bugs1378631
milestone56.0a1
Bug 1378631. P3 - remove dead code. MozReview-Commit-ID: 6BO25ykG3ps
dom/media/MediaDecoderReader.cpp
dom/media/MediaDecoderReader.h
--- a/dom/media/MediaDecoderReader.cpp
+++ b/dom/media/MediaDecoderReader.cpp
@@ -83,32 +83,19 @@ MediaDecoderReader::MediaDecoderReader(c
 {
   MOZ_COUNT_CTOR(MediaDecoderReader);
   MOZ_ASSERT(NS_IsMainThread());
 }
 
 nsresult
 MediaDecoderReader::Init()
 {
-  // Dispatch initialization that needs to happen on that task queue.
-  mTaskQueue->Dispatch(
-    NewRunnableMethod("MediaDecoderReader::InitializationTask",
-                      this,
-                      &MediaDecoderReader::InitializationTask));
   return InitInternal();
 }
 
-void
-MediaDecoderReader::InitializationTask()
-{
-  if (!mDecoder) {
-    return;
-  }
-}
-
 MediaDecoderReader::~MediaDecoderReader()
 {
   MOZ_ASSERT(mShutdown);
   MOZ_COUNT_DTOR(MediaDecoderReader);
 }
 
 size_t MediaDecoderReader::SizeOfVideoQueueInBytes() const
 {
--- a/dom/media/MediaDecoderReader.h
+++ b/dom/media/MediaDecoderReader.h
@@ -332,22 +332,16 @@ protected:
   // Notify if we are waiting for a decryption key.
   MediaEventProducer<TrackInfo::TrackType> mOnTrackWaitingForKey;
 
   RefPtr<MediaResource> mResource;
 
 private:
   virtual nsresult InitInternal() { return NS_OK; }
 
-  // Does any spinup that needs to happen on this task queue. This runs on a
-  // different thread than Init, and there should not be ordering dependencies
-  // between the two (even though in practice, Init will always run first right
-  // now thanks to the tail dispatcher).
-  void InitializationTask();
-
   // Read header data for all bitstreams in the file. Fills aInfo with
   // the data required to present the media, and optionally fills *aTags
   // with tag metadata from the file.
   // Returns NS_OK on success, or NS_ERROR_FAILURE on failure.
   virtual nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags)
   {
     MOZ_CRASH();
   }