From d4e021d74c8939863741ac6ff956d3f9d5df674c Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Thu, 18 Jul 2013 08:33:28 +0200 Subject: [PATCH] Bug 894925 - Hold a strong ref to the ImageContainer between DispatchImageClientUpdate and UpdateImageClientNow. r=nical --- gfx/layers/ipc/ImageBridgeChild.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp index b54e3a135e7e..bb89de6e36cd 100644 --- a/gfx/layers/ipc/ImageBridgeChild.cpp +++ b/gfx/layers/ipc/ImageBridgeChild.cpp @@ -15,6 +15,7 @@ #include "nsXULAppAPI.h" #include "mozilla/layers/TextureClient.h" #include "mozilla/layers/ImageClient.h" +#include "ImageContainer.h" #include "mozilla/layers/LayersTypes.h" #include "ShadowLayers.h" @@ -316,7 +317,10 @@ void ImageBridgeChild::DispatchImageClientUpdate(ImageClient* aClient, } sImageBridgeChildSingleton->GetMessageLoop()->PostTask( FROM_HERE, - NewRunnableFunction(&UpdateImageClientNow, aClient, aContainer)); + NewRunnableFunction< + void (*)(ImageClient*, ImageContainer*), + ImageClient*, + nsRefPtr >(&UpdateImageClientNow, aClient, aContainer)); } void