mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 611033 - Don't retain the plugin surface beyond the lifetime of the PluginInstanceParent: we only guarantee that the plugin X socket will kept alive until PluginModuleParent::ActorDestroy, r=karlt
This commit is contained in:
parent
542fdd7b82
commit
0aa2cd1075
@ -172,6 +172,19 @@ PluginInstanceParent::ActorDestroy(ActorDestroyReason why)
|
||||
UnsubclassPluginWindow();
|
||||
}
|
||||
#endif
|
||||
// After this method, the data backing the remote surface may no
|
||||
// longer be calid. The X surface may be destroyed, or the shared
|
||||
// memory backing this surface may no longer be valid. The right
|
||||
// way to inform the nsObjectFrame that the surface is no longer
|
||||
// valid is with an invalidate call.
|
||||
if (mFrontSurface) {
|
||||
mFrontSurface = NULL;
|
||||
const NPRect rect = {0, 0, 0, 0};
|
||||
RecvNPN_InvalidateRect(rect);
|
||||
#ifdef MOZ_X11
|
||||
XSync(DefaultXDisplay(), False);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
NPError
|
||||
|
@ -1711,8 +1711,10 @@ PRBool
|
||||
nsPluginInstanceOwner::SetCurrentImage(ImageContainer* aContainer)
|
||||
{
|
||||
mInstance->GetSurface(getter_AddRefs(mLayerSurface));
|
||||
if (!mLayerSurface)
|
||||
if (!mLayerSurface) {
|
||||
aContainer->SetCurrentImage(nsnull);
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
Image::Format format = Image::CAIRO_SURFACE;
|
||||
nsRefPtr<Image> image;
|
||||
|
Loading…
Reference in New Issue
Block a user