Bug 1184333 - Handle GMP crashing inside GMPVideoDecoder trial create. r=edwin,a=rituk
authorChris Pearce <cpearce@mozilla.com>
Fri, 17 Jul 2015 11:09:39 +1200
changeset 281574 832a06a3935fc5fd2f63723b57675f7d75eb2b71
parent 281573 eef8b75019942fdd47ef944ac4c95fec37fa4e6d
child 281575 dbd1d3a58d3fbbdc6a8ab08d4e9891d269bb4e3b
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin, rituk
bugs1184333
milestone41.0a2
Bug 1184333 - Handle GMP crashing inside GMPVideoDecoder trial create. r=edwin,a=rituk
dom/media/eme/GMPVideoDecoderTrialCreator.cpp
--- a/dom/media/eme/GMPVideoDecoderTrialCreator.cpp
+++ b/dom/media/eme/GMPVideoDecoderTrialCreator.cpp
@@ -448,16 +448,21 @@ TestGMPVideoDecoder::InitGMPDone(GMPVide
                                  PR_GetNumberOfProcessors());
   if (NS_FAILED(rv)) {
     EME_LOG("InitGMPDone() - InitDecode() failed!");
     ReportFailure(NS_LITERAL_CSTRING("TestGMPVideoDecoder InitDecode() returned failure"));
     return;
   }
 
   GMPUniquePtr<GMPVideoEncodedFrame> frame = CreateFrame(aHost);
+  if (!frame) {
+    EME_LOG("InitGMPDone() - Decode() failed to create frame!");
+    ReportFailure(NS_LITERAL_CSTRING("TestGMPVideoDecoder Decode() failed to create frame"));
+    return;
+  }
   nsTArray<uint8_t> info; // No codec specific per-frame info to pass.
   rv = mGMP->Decode(Move(frame), false, info, 0);
   if (NS_FAILED(rv)) {
     EME_LOG("InitGMPDone() - Decode() failed to send Decode message!");
     ReportFailure(NS_LITERAL_CSTRING("TestGMPVideoDecoder Decode() returned failure"));
     return;
   }