mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 832456: Declare nsRunnable subclass at file scope instead of inside of a function, to fix build warning about 'visibility' attribute being ignored. r=BenWa
This commit is contained in:
parent
ae20ff569a
commit
9f5f951033
@ -15,24 +15,25 @@ gfxReusableSurfaceWrapper::gfxReusableSurfaceWrapper(gfxImageSurface* aSurface)
|
||||
MOZ_COUNT_CTOR(gfxReusableSurfaceWrapper);
|
||||
}
|
||||
|
||||
class DeleteImageOnMainThread : public nsRunnable {
|
||||
public:
|
||||
DeleteImageOnMainThread(gfxImageSurface *aImage)
|
||||
: mImage(aImage)
|
||||
{}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
private:
|
||||
nsRefPtr<gfxImageSurface> mImage;
|
||||
};
|
||||
|
||||
gfxReusableSurfaceWrapper::~gfxReusableSurfaceWrapper()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(mReadCount == 0, "Should not be locked when released");
|
||||
MOZ_COUNT_DTOR(gfxReusableSurfaceWrapper);
|
||||
if (!NS_IsMainThread()) {
|
||||
class DeleteImageOnMainThread : public nsRunnable {
|
||||
public:
|
||||
DeleteImageOnMainThread(gfxImageSurface *aImage)
|
||||
: mImage(aImage)
|
||||
{}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
private:
|
||||
nsRefPtr<gfxImageSurface> mImage;
|
||||
};
|
||||
NS_DispatchToMainThread(new DeleteImageOnMainThread(mSurface));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user