Bug 624809 - Flash crash while calling RPC methods from SetWindow because pending AsyncSetWindow calls are processed in an unexpected order, r=roc a=blocker

--HG--
extra : rebase_source : 824e72d2567ea711d84a0737ad3fa0de37ef6347
This commit is contained in:
Benjamin Smedberg 2011-01-14 09:37:20 -05:00
Родитель 67429db193
Коммит ae9ec0318e
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -2544,7 +2544,6 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect,
if (mMaemoImageRendering &&
aSurface->GetType() == gfxASurface::SurfaceTypeImage) {
aSurface->Flush();
mPendingPluginCall = PR_TRUE;
gfxImageSurface* image = static_cast<gfxImageSurface*>(aSurface);
NPImageExpose imgExp;
imgExp.depth = gfxUtils::ImageFormatToDepth(image->Format());
@ -2577,14 +2576,12 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect,
exposeEvent.major_code = 0;
exposeEvent.minor_code = 0;
mPluginIface->event(&mData, reinterpret_cast<void*>(&exposeEvent));
mPendingPluginCall = PR_FALSE;
return;
}
#endif
NS_ASSERTION(aSurface->GetType() == gfxASurface::SurfaceTypeXlib,
"Non supported platform surface type");
mPendingPluginCall = true;
NPEvent pluginEvent;
XGraphicsExposeEvent& exposeEvent = pluginEvent.xgraphicsexpose;
exposeEvent.type = GraphicsExpose;
@ -2601,7 +2598,6 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect,
exposeEvent.major_code = 0;
exposeEvent.minor_code = 0;
mPluginIface->event(&mData, reinterpret_cast<void*>(&exposeEvent));
mPendingPluginCall = false;
return;
#endif
@ -2609,8 +2605,6 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect,
NS_ASSERTION(SharedDIBSurface::IsSharedDIBSurface(aSurface),
"Expected (SharedDIB) image surface.");
mPendingPluginCall = true;
// This rect is in the window coordinate space. aRect is in the plugin
// coordinate space.
RECT rect = {
@ -2627,7 +2621,6 @@ PluginInstanceChild::PaintRectToPlatformSurface(const nsIntRect& aRect,
::SetViewportOrgEx((HDC) mWindow.window, -mWindow.x, -mWindow.y, NULL);
mPluginIface->event(&mData, reinterpret_cast<void*>(&paintEvent));
mPendingPluginCall = false;
return;
#endif
@ -2737,6 +2730,9 @@ PluginInstanceChild::ShowPluginFrame()
return false;
}
AutoRestore<bool> pending(mPendingPluginCall);
mPendingPluginCall = true;
if (!EnsureCurrentBuffer()) {
return false;
}