Bug 1365516 - Remove the call to AbstractThread::GetCurrent() in WebRenderImageLayer.cpp. draft
authorJW Wang <jwwang@mozilla.com>
Thu, 18 May 2017 14:23:09 +0800
changeset 580122 e3cebf5bd4cd002e69bec80f9bb1ef9d2a3f44fc
parent 580121 5d7189453d82844d55e3d90c79792b2edd7bdd0d
child 580896 b6fc15cd6e79b6f33772a56eefc2d6d657cb8e34
push id59449
push userjwwang@mozilla.com
push dateThu, 18 May 2017 06:32:49 +0000
bugs1365516
milestone55.0a1
Bug 1365516 - Remove the call to AbstractThread::GetCurrent() in WebRenderImageLayer.cpp. MozReview-Commit-ID: 5UMQuqEMZCu
gfx/layers/wr/WebRenderImageLayer.cpp
--- a/gfx/layers/wr/WebRenderImageLayer.cpp
+++ b/gfx/layers/wr/WebRenderImageLayer.cpp
@@ -101,17 +101,17 @@ WebRenderImageLayer::RenderLayer(wr::Dis
   // Allocate PipelineId if necessary
   if (GetImageClientType() == CompositableType::IMAGE_BRIDGE &&
       mPipelineId.isNothing() && !mPipelineIdRequest.Exists()) {
     // Use Holder to pass this pointer to lambda.
     // Static anaysis tool does not permit to pass refcounted variable to lambda.
     // And we do not want to use RefPtr<WebRenderImageLayer> here.
     Holder holder(this);
     WrManager()->AllocPipelineId()
-      ->Then(AbstractThread::GetCurrent(), __func__,
+      ->Then(AbstractThread::MainThread(), __func__,
       [holder] (const wr::PipelineId& aPipelineId) {
         holder->mPipelineIdRequest.Complete();
         holder->mPipelineId = Some(aPipelineId);
       },
       [holder] (const ipc::PromiseRejectReason &aReason) {
         holder->mPipelineIdRequest.Complete();
       })->Track(mPipelineIdRequest);
   }