From b70eb2c06d367e5fbbf492720b5da8f1d5355cc1 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 b54e3a135e7..bb89de6e36c 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