Bug 1280651: Fix invokation of |PostTask|, r=khuey

MozReview-Commit-ID: 4H5sGYe85oR
This commit is contained in:
Thomas Zimmermann 2016-06-20 12:24:05 +02:00
parent 2c1b44b88b
commit 5186cea577

View File

@ -343,10 +343,11 @@ ImageBridgeChild::NotifyNotUsedToNonRecycle(uint64_t aTextureId, uint64_t aTrans
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