Bug 1313497 - Use InvokeAsync with Storages in OmxDataDecoder - r=jya
authorGerald Squelart <gsquelart@mozilla.com>
Sat, 19 Nov 2016 11:28:43 +1100
changeset 324384 4e38b63c78297a4c3471f0cf2b896e26c04a5c1e
parent 324383 7b4b358976d41bc4245935954c48c94a3372d44f
child 324385 a74bd474c1a6f4f5cafc3e5e80cf923bb343bfd3
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersjya
bugs1313497
milestone53.0a1
Bug 1313497 - Use InvokeAsync with Storages in OmxDataDecoder - r=jya This is necessary now because raw pointers cannot be passed through naked InvokeAsync. MozReview-Commit-ID: 5TvR9yrbn0E
dom/media/platforms/omx/OmxDataDecoder.cpp
--- a/dom/media/platforms/omx/OmxDataDecoder.cpp
+++ b/dom/media/platforms/omx/OmxDataDecoder.cpp
@@ -155,18 +155,18 @@ OmxDataDecoder::Init()
   mReaderTaskQueue = AbstractThread::GetCurrent()->AsTaskQueue();
   MOZ_ASSERT(mReaderTaskQueue);
 
   RefPtr<InitPromise> p = mInitPromise.Ensure(__func__);
   RefPtr<OmxDataDecoder> self = this;
 
   // TODO: it needs to get permission from resource manager before allocating
   //       Omx component.
-  InvokeAsync(mOmxTaskQueue, mOmxLayer.get(), __func__, &OmxPromiseLayer::Init,
-              mTrackInfo.get())
+  InvokeAsync<const TrackInfo*>(mOmxTaskQueue, mOmxLayer.get(), __func__,
+                                &OmxPromiseLayer::Init, mTrackInfo.get())
     ->Then(mOmxTaskQueue, __func__,
       [self] () {
         // Omx state should be OMX_StateIdle.
         self->mOmxState = self->mOmxLayer->GetState();
         MOZ_ASSERT(self->mOmxState != OMX_StateIdle);
       },
       [self] () {
         self->RejectInitPromise(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);