Bug 1289211 - Rename InfallibleTArray to nsTArray in dom/media/ r=jya
authorBarret Rennie <barret@brennie.ca>
Wed, 10 Jul 2019 04:14:23 +0000
changeset 542703 fc20e569473e54ba1c0376ada5b2915b613384f8
parent 542702 54826f4341628435e4b9f8772e64ae973cb6e33a
child 542704 4bb011651a380c34cd6d9834e4e582aba4febb1d
push id11848
push userffxbld-merge
push dateMon, 26 Aug 2019 19:26:25 +0000
treeherdermozilla-beta@9b31bfdfac10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1289211
milestone70.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 1289211 - Rename InfallibleTArray to nsTArray in dom/media/ r=jya Differential Revision: https://phabricator.services.mozilla.com/D36946
dom/media/gmp/GMPStorageChild.cpp
dom/media/gmp/GMPStorageChild.h
dom/media/gmp/GMPStorageParent.cpp
dom/media/gmp/GMPStorageParent.h
dom/media/gmp/GMPVideoDecoderChild.cpp
dom/media/gmp/GMPVideoDecoderChild.h
dom/media/gmp/GMPVideoEncoderChild.cpp
dom/media/gmp/GMPVideoEncoderChild.h
dom/media/gmp/GMPVideoEncoderParent.cpp
dom/media/gmp/GMPVideoEncoderParent.h
dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
--- a/dom/media/gmp/GMPStorageChild.cpp
+++ b/dom/media/gmp/GMPStorageChild.cpp
@@ -197,17 +197,17 @@ mozilla::ipc::IPCResult GMPStorageChild:
     return IPC_OK();
   }
   record->OpenComplete(aStatus);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult GMPStorageChild::RecvReadComplete(
     const nsCString& aRecordName, const GMPErr& aStatus,
-    InfallibleTArray<uint8_t>&& aBytes) {
+    nsTArray<uint8_t>&& aBytes) {
   if (mShutdown) {
     return IPC_OK();
   }
   RefPtr<GMPRecordImpl> record = GetRecord(aRecordName);
   if (!record) {
     // Not fatal.
     return IPC_OK();
   }
--- a/dom/media/gmp/GMPStorageChild.h
+++ b/dom/media/gmp/GMPStorageChild.h
@@ -73,17 +73,17 @@ class GMPStorageChild : public PGMPStora
  protected:
   ~GMPStorageChild() {}
 
   // PGMPStorageChild
   mozilla::ipc::IPCResult RecvOpenComplete(const nsCString& aRecordName,
                                            const GMPErr& aStatus);
   mozilla::ipc::IPCResult RecvReadComplete(const nsCString& aRecordName,
                                            const GMPErr& aStatus,
-                                           InfallibleTArray<uint8_t>&& aBytes);
+                                           nsTArray<uint8_t>&& aBytes);
   mozilla::ipc::IPCResult RecvWriteComplete(const nsCString& aRecordName,
                                             const GMPErr& aStatus);
   mozilla::ipc::IPCResult RecvShutdown();
 
  private:
   Monitor mMonitor;
   nsRefPtrHashtable<nsCStringHashKey, GMPRecordImpl> mRecords;
   GMPChild* mPlugin;
--- a/dom/media/gmp/GMPStorageParent.cpp
+++ b/dom/media/gmp/GMPStorageParent.cpp
@@ -119,17 +119,17 @@ mozilla::ipc::IPCResult GMPStorageParent
          this, aRecordName.get(), data.Length(), static_cast<uint32_t>(rv)));
     Unused << SendReadComplete(aRecordName, rv, data);
   }
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult GMPStorageParent::RecvWrite(
-    const nsCString& aRecordName, InfallibleTArray<uint8_t>&& aBytes) {
+    const nsCString& aRecordName, nsTArray<uint8_t>&& aBytes) {
   LOGD(("GMPStorageParent[%p]::RecvWrite(record='%s') %zu bytes", this,
         aRecordName.get(), aBytes.Length()));
 
   if (mShutdown) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   if (!mStorage->IsOpen(aRecordName)) {
--- a/dom/media/gmp/GMPStorageParent.h
+++ b/dom/media/gmp/GMPStorageParent.h
@@ -22,19 +22,18 @@ class GMPStorageParent : public PGMPStor
   GMPStorageParent(const nsCString& aNodeId, GMPParent* aPlugin);
 
   nsresult Init();
   void Shutdown();
 
  protected:
   mozilla::ipc::IPCResult RecvOpen(const nsCString& aRecordName) override;
   mozilla::ipc::IPCResult RecvRead(const nsCString& aRecordName) override;
-  mozilla::ipc::IPCResult RecvWrite(
-      const nsCString& aRecordName,
-      InfallibleTArray<uint8_t>&& aBytes) override;
+  mozilla::ipc::IPCResult RecvWrite(const nsCString& aRecordName,
+                                    nsTArray<uint8_t>&& aBytes) override;
   mozilla::ipc::IPCResult RecvClose(const nsCString& aRecordName) override;
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
  private:
   ~GMPStorageParent() {}
 
   RefPtr<GMPStorage> mStorage;
 
--- a/dom/media/gmp/GMPVideoDecoderChild.cpp
+++ b/dom/media/gmp/GMPVideoDecoderChild.cpp
@@ -85,33 +85,32 @@ void GMPVideoDecoderChild::ResetComplete
 
 void GMPVideoDecoderChild::Error(GMPErr aError) {
   MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
 
   SendError(aError);
 }
 
 mozilla::ipc::IPCResult GMPVideoDecoderChild::RecvInitDecode(
-    const GMPVideoCodec& aCodecSettings,
-    InfallibleTArray<uint8_t>&& aCodecSpecific, const int32_t& aCoreCount) {
+    const GMPVideoCodec& aCodecSettings, nsTArray<uint8_t>&& aCodecSpecific,
+    const int32_t& aCoreCount) {
   if (!mVideoDecoder) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   // Ignore any return code. It is OK for this to fail without killing the
   // process.
   mVideoDecoder->InitDecode(aCodecSettings, aCodecSpecific.Elements(),
                             aCodecSpecific.Length(), this, aCoreCount);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult GMPVideoDecoderChild::RecvDecode(
     const GMPVideoEncodedFrameData& aInputFrame, const bool& aMissingFrames,
-    InfallibleTArray<uint8_t>&& aCodecSpecificInfo,
-    const int64_t& aRenderTimeMs) {
+    nsTArray<uint8_t>&& aCodecSpecificInfo, const int64_t& aRenderTimeMs) {
   if (!mVideoDecoder) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   auto f = new GMPVideoEncodedFrameImpl(aInputFrame, &mVideoHost);
 
   // Ignore any return code. It is OK for this to fail without killing the
   // process.
--- a/dom/media/gmp/GMPVideoDecoderChild.h
+++ b/dom/media/gmp/GMPVideoDecoderChild.h
@@ -44,23 +44,22 @@ class GMPVideoDecoderChild : public PGMP
   bool Alloc(size_t aSize, Shmem::SharedMemory::SharedMemoryType aType,
              Shmem* aMem) override;
   void Dealloc(Shmem&& aMem) override;
 
  private:
   virtual ~GMPVideoDecoderChild();
 
   // PGMPVideoDecoderChild
-  mozilla::ipc::IPCResult RecvInitDecode(
-      const GMPVideoCodec& aCodecSettings,
-      InfallibleTArray<uint8_t>&& aCodecSpecific, const int32_t& aCoreCount);
+  mozilla::ipc::IPCResult RecvInitDecode(const GMPVideoCodec& aCodecSettings,
+                                         nsTArray<uint8_t>&& aCodecSpecific,
+                                         const int32_t& aCoreCount);
   mozilla::ipc::IPCResult RecvDecode(
       const GMPVideoEncodedFrameData& aInputFrame, const bool& aMissingFrames,
-      InfallibleTArray<uint8_t>&& aCodecSpecificInfo,
-      const int64_t& aRenderTimeMs);
+      nsTArray<uint8_t>&& aCodecSpecificInfo, const int64_t& aRenderTimeMs);
   mozilla::ipc::IPCResult RecvChildShmemForPool(Shmem&& aFrameBuffer);
   mozilla::ipc::IPCResult RecvReset();
   mozilla::ipc::IPCResult RecvDrain();
   mozilla::ipc::IPCResult RecvDecodingComplete();
 
   GMPContentChild* mPlugin;
   GMPVideoDecoder* mVideoDecoder;
   GMPVideoHostImpl mVideoHost;
--- a/dom/media/gmp/GMPVideoEncoderChild.cpp
+++ b/dom/media/gmp/GMPVideoEncoderChild.cpp
@@ -55,36 +55,35 @@ void GMPVideoEncoderChild::Encoded(GMPVi
 
 void GMPVideoEncoderChild::Error(GMPErr aError) {
   MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
 
   SendError(aError);
 }
 
 mozilla::ipc::IPCResult GMPVideoEncoderChild::RecvInitEncode(
-    const GMPVideoCodec& aCodecSettings,
-    InfallibleTArray<uint8_t>&& aCodecSpecific, const int32_t& aNumberOfCores,
-    const uint32_t& aMaxPayloadSize) {
+    const GMPVideoCodec& aCodecSettings, nsTArray<uint8_t>&& aCodecSpecific,
+    const int32_t& aNumberOfCores, const uint32_t& aMaxPayloadSize) {
   if (!mVideoEncoder) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   // Ignore any return code. It is OK for this to fail without killing the
   // process.
   mVideoEncoder->InitEncode(aCodecSettings, aCodecSpecific.Elements(),
                             aCodecSpecific.Length(), this, aNumberOfCores,
                             aMaxPayloadSize);
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult GMPVideoEncoderChild::RecvEncode(
     const GMPVideoi420FrameData& aInputFrame,
-    InfallibleTArray<uint8_t>&& aCodecSpecificInfo,
-    InfallibleTArray<GMPVideoFrameType>&& aFrameTypes) {
+    nsTArray<uint8_t>&& aCodecSpecificInfo,
+    nsTArray<GMPVideoFrameType>&& aFrameTypes) {
   if (!mVideoEncoder) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   auto f = new GMPVideoi420FrameImpl(aInputFrame, &mVideoHost);
 
   // Ignore any return code. It is OK for this to fail without killing the
   // process.
--- a/dom/media/gmp/GMPVideoEncoderChild.h
+++ b/dom/media/gmp/GMPVideoEncoderChild.h
@@ -40,24 +40,23 @@ class GMPVideoEncoderChild : public PGMP
   bool Alloc(size_t aSize, Shmem::SharedMemory::SharedMemoryType aType,
              Shmem* aMem) override;
   void Dealloc(Shmem&& aMem) override;
 
  private:
   virtual ~GMPVideoEncoderChild();
 
   // PGMPVideoEncoderChild
-  mozilla::ipc::IPCResult RecvInitEncode(
-      const GMPVideoCodec& aCodecSettings,
-      InfallibleTArray<uint8_t>&& aCodecSpecific, const int32_t& aNumberOfCores,
-      const uint32_t& aMaxPayloadSize);
-  mozilla::ipc::IPCResult RecvEncode(
-      const GMPVideoi420FrameData& aInputFrame,
-      InfallibleTArray<uint8_t>&& aCodecSpecificInfo,
-      InfallibleTArray<GMPVideoFrameType>&& aFrameTypes);
+  mozilla::ipc::IPCResult RecvInitEncode(const GMPVideoCodec& aCodecSettings,
+                                         nsTArray<uint8_t>&& aCodecSpecific,
+                                         const int32_t& aNumberOfCores,
+                                         const uint32_t& aMaxPayloadSize);
+  mozilla::ipc::IPCResult RecvEncode(const GMPVideoi420FrameData& aInputFrame,
+                                     nsTArray<uint8_t>&& aCodecSpecificInfo,
+                                     nsTArray<GMPVideoFrameType>&& aFrameTypes);
   mozilla::ipc::IPCResult RecvChildShmemForPool(Shmem&& aEncodedBuffer);
   mozilla::ipc::IPCResult RecvSetChannelParameters(const uint32_t& aPacketLoss,
                                                    const uint32_t& aRTT);
   mozilla::ipc::IPCResult RecvSetRates(const uint32_t& aNewBitRate,
                                        const uint32_t& aFrameRate);
   mozilla::ipc::IPCResult RecvSetPeriodicKeyFrames(const bool& aEnable);
   mozilla::ipc::IPCResult RecvEncodingComplete();
 
--- a/dom/media/gmp/GMPVideoEncoderParent.cpp
+++ b/dom/media/gmp/GMPVideoEncoderParent.cpp
@@ -240,17 +240,17 @@ void GMPVideoEncoderParent::ActorDestroy
     mPlugin = nullptr;
   }
   mVideoHost.ActorDestroyed();  // same as DoneWithAPI
   MaybeDisconnect(aWhy == AbnormalShutdown);
 }
 
 mozilla::ipc::IPCResult GMPVideoEncoderParent::RecvEncoded(
     const GMPVideoEncodedFrameData& aEncodedFrame,
-    InfallibleTArray<uint8_t>&& aCodecSpecificInfo) {
+    nsTArray<uint8_t>&& aCodecSpecificInfo) {
   if (!mCallback) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   auto f = new GMPVideoEncodedFrameImpl(aEncodedFrame, &mVideoHost);
   // Ignore any return code. It is OK for this to fail without killing the
   // process. This can be called on any thread (or more than one)
   mCallback->Encoded(f, aCodecSpecificInfo);
--- a/dom/media/gmp/GMPVideoEncoderParent.h
+++ b/dom/media/gmp/GMPVideoEncoderParent.h
@@ -62,17 +62,17 @@ class GMPVideoEncoderParent : public GMP
 
  private:
   virtual ~GMPVideoEncoderParent(){};
 
   // PGMPVideoEncoderParent
   void ActorDestroy(ActorDestroyReason aWhy) override;
   mozilla::ipc::IPCResult RecvEncoded(
       const GMPVideoEncodedFrameData& aEncodedFrame,
-      InfallibleTArray<uint8_t>&& aCodecSpecificInfo) override;
+      nsTArray<uint8_t>&& aCodecSpecificInfo) override;
   mozilla::ipc::IPCResult RecvError(const GMPErr& aError) override;
   mozilla::ipc::IPCResult RecvShutdown() override;
   mozilla::ipc::IPCResult RecvParentShmemForPool(Shmem&& aFrameBuffer) override;
   mozilla::ipc::IPCResult AnswerNeedShmem(const uint32_t& aEncodedBufferSize,
                                           Shmem* aMem) override;
   mozilla::ipc::IPCResult Recv__delete__() override;
 
   bool mIsOpen;
--- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
+++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
@@ -30,17 +30,17 @@ using mozilla::intl::LocaleService;
 
 #undef LOG
 extern mozilla::LogModule* GetSpeechSynthLog();
 #define LOG(type, msg) MOZ_LOG(GetSpeechSynthLog(), type, msg)
 
 namespace {
 
 void GetAllSpeechSynthActors(
-    InfallibleTArray<mozilla::dom::SpeechSynthesisParent*>& aActors) {
+    nsTArray<mozilla::dom::SpeechSynthesisParent*>& aActors) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aActors.IsEmpty());
 
   AutoTArray<mozilla::dom::ContentParent*, 20> contentActors;
   mozilla::dom::ContentParent::GetAll(contentActors);
 
   for (uint32_t contentIndex = 0; contentIndex < contentActors.Length();
        ++contentIndex) {
@@ -182,18 +182,18 @@ nsSynthVoiceRegistry::GetInstanceForServ
 
   return registry.forget();
 }
 
 bool nsSynthVoiceRegistry::SendInitialVoicesAndState(
     SpeechSynthesisParent* aParent) {
   MOZ_ASSERT(XRE_IsParentProcess());
 
-  InfallibleTArray<RemoteVoice> voices;
-  InfallibleTArray<nsString> defaults;
+  nsTArray<RemoteVoice> voices;
+  nsTArray<nsString> defaults;
 
   for (uint32_t i = 0; i < mVoices.Length(); ++i) {
     RefPtr<VoiceData> voice = mVoices[i];
 
     voices.AppendElement(RemoteVoice(voice->mUri, voice->mName, voice->mLang,
                                      voice->mIsLocal, voice->mIsQueued));
   }