Bug 1280651: Fix invokation of |PostTask|, r=khuey
authorThomas Zimmermann <tdz@users.sourceforge.net>
Mon, 20 Jun 2016 12:24:05 +0200
changeset 302073 a5823080aa8366b895df6e7f1c0f56afd6aca79e
parent 302072 de10fb9ec9e53855b1770530c184fc4be3ad03de
child 302074 ba16194f3602ec2209accc42b9c9b1daffa930fd
push id78575
push usertdz@users.sourceforge.net
push dateMon, 20 Jun 2016 10:24:21 +0000
treeherdermozilla-inbound@a5823080aa83 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1280651
milestone50.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 1280651: Fix invokation of |PostTask|, r=khuey MozReview-Commit-ID: 4H5sGYe85oR
gfx/layers/ipc/ImageBridgeChild.cpp
--- a/gfx/layers/ipc/ImageBridgeChild.cpp
+++ b/gfx/layers/ipc/ImageBridgeChild.cpp
@@ -338,20 +338,21 @@ ImageBridgeChild::NotifyNotUsedToNonRecy
     return;
   }
 
   MOZ_ASSERT(aTextureId == client->GetSerial());
   client->ClearWaitFenceHandleOnImageBridge(mWaitingFenceHandleMutex);
   mTexturesWaitingFenceHandle.Remove(aTextureId);
 
   // Release TextureClient on allocator's message loop.
-  TextureClientReleaseTask* task = new TextureClientReleaseTask(client);
+  RefPtr<TextureClientReleaseTask> task =
+    MakeAndAddRef<TextureClientReleaseTask>(client);
   RefPtr<ClientIPCAllocator> allocator = client->GetAllocator();
   client = nullptr;
-  allocator->AsClientAllocator()->GetMessageLoop()->PostTask(FROM_HERE, task);
+  allocator->AsClientAllocator()->GetMessageLoop()->PostTask(task.forget());
 #else
   NS_RUNTIMEABORT("not reached");
 #endif
 }
 
 void
 ImageBridgeChild::CancelWaitFenceHandle(TextureClient* aClient)
 {