Bug 1209887. Part 3 - remove unused code. r=jya.
authorJW Wang <jwwang@mozilla.com>
Thu, 01 Oct 2015 17:21:57 +0800
changeset 265593 0e575a81a5f531b4942abd6ec72f0df3e5af7959
parent 265592 ef11325051ad4699e159fe4ecb4fe73f12a078fe
child 265594 d90c13f43f4de7923f662a0b0bb60cbee2eba5d1
push id15472
push usercbook@mozilla.com
push dateFri, 02 Oct 2015 11:51:34 +0000
treeherderfx-team@2c33ef6b27e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1209887
milestone44.0a1
Bug 1209887. Part 3 - remove unused code. r=jya.
dom/media/wave/WaveReader.cpp
dom/media/wave/WaveReader.h
--- a/dom/media/wave/WaveReader.cpp
+++ b/dom/media/wave/WaveReader.cpp
@@ -518,39 +518,16 @@ WaveReader::GetDataLength()
 
 int64_t
 WaveReader::GetPosition()
 {
   return mResource.Tell();
 }
 
 bool
-WaveReader::GetNextChunk(uint32_t* aChunk, uint32_t* aChunkSize)
-{
-  MOZ_ASSERT(aChunk, "Must have aChunk");
-  MOZ_ASSERT(aChunkSize, "Must have aChunkSize");
-  MOZ_ASSERT(mResource.Tell() % 2 == 0,
-             "GetNextChunk called with unaligned resource");
-
-  char chunkHeader[CHUNK_HEADER_SIZE];
-  const char* p = chunkHeader;
-
-  if (!ReadAll(chunkHeader, sizeof(chunkHeader))) {
-    return false;
-  }
-
-  static_assert(sizeof(uint32_t) * 2 <= CHUNK_HEADER_SIZE,
-                "Reads would overflow chunkHeader buffer.");
-  *aChunk = ReadUint32BE(&p);
-  *aChunkSize = ReadUint32LE(&p);
-
-  return true;
-}
-
-bool
 WaveReader::LoadListChunk(uint32_t aChunkSize,
                           nsAutoPtr<dom::HTMLMediaElement::MetadataTags> &aTags)
 {
   MOZ_ASSERT(OnTaskQueue());
 
   // List chunks are always word (two byte) aligned.
   MOZ_ASSERT(mResource.Tell() % 2 == 0,
              "LoadListChunk called with unaligned resource");
--- a/dom/media/wave/WaveReader.h
+++ b/dom/media/wave/WaveReader.h
@@ -44,17 +44,16 @@ public:
 
   virtual media::TimeIntervals GetBuffered() override;
 
   virtual bool IsMediaSeekable() override;
 
 private:
   bool ReadAll(char* aBuf, int64_t aSize, int64_t* aBytesRead = nullptr);
   bool LoadRIFFChunk();
-  bool GetNextChunk(uint32_t* aChunk, uint32_t* aChunkSize);
   bool LoadFormatChunk(uint32_t aChunkSize);
   bool FindDataOffset(uint32_t aChunkSize);
   bool LoadListChunk(uint32_t aChunkSize, nsAutoPtr<dom::HTMLMediaElement::MetadataTags> &aTags);
   bool LoadAllChunks(nsAutoPtr<dom::HTMLMediaElement::MetadataTags> &aTags);
 
   // Returns the number of seconds that aBytes represents based on the
   // current audio parameters.  e.g.  176400 bytes is 1 second at 16-bit
   // stereo 44.1kHz. The time is rounded to the nearest microsecond.