From ea451bc5b1fe38975403afe723cdd34472fd125b Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Wed, 10 Aug 2011 10:12:25 -0400 Subject: [PATCH] Bug 671916 - Fix windowless Flash Player painting crash; r=cjones --- dom/plugins/ipc/PluginInstanceChild.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp index 4ed9ae31c18..463b2afb696 100644 --- a/dom/plugins/ipc/PluginInstanceChild.cpp +++ b/dom/plugins/ipc/PluginInstanceChild.cpp @@ -3518,7 +3518,13 @@ PluginInstanceChild::SwapSurfaces() mDoubleBufferCARenderer.ClearFrontSurface(); } -#endif //MOZ_WIDGET_COCOA +#else + if (mCurrentSurface && mBackSurface && + (mCurrentSurface->GetSize() != mBackSurface->GetSize() || + mCurrentSurface->GetContentType() != mBackSurface->GetContentType())) { + ClearCurrentSurface(); + } +#endif } void