mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 626602, part 8.1: Close the XDisplay to free the gfxXlibSurface DisplayTable, for the sake of leak checkers. r=karlt
This commit is contained in:
parent
c593a45834
commit
e25c495c5c
@ -137,14 +137,9 @@ PluginModuleChild::~PluginModuleChild()
|
||||
if (mLibrary) {
|
||||
PR_UnloadLibrary(mLibrary);
|
||||
}
|
||||
#ifdef MOZ_WIDGET_QT
|
||||
nsQAppInstance::Release();
|
||||
if (sGtkLib) {
|
||||
PR_UnloadLibrary(sGtkLib);
|
||||
sGtkLib = nsnull;
|
||||
s_gtk_init = nsnull;
|
||||
}
|
||||
#endif
|
||||
|
||||
DeinitGraphics();
|
||||
|
||||
gInstance = nsnull;
|
||||
}
|
||||
|
||||
@ -559,6 +554,26 @@ PluginModuleChild::InitGraphics()
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
PluginModuleChild::DeinitGraphics()
|
||||
{
|
||||
#ifdef MOZ_WIDGET_QT
|
||||
nsQAppInstance::Release();
|
||||
if (sGtkLib) {
|
||||
PR_UnloadLibrary(sGtkLib);
|
||||
sGtkLib = nsnull;
|
||||
s_gtk_init = nsnull;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_X11) && defined(NS_FREE_PERMANENT_DATA)
|
||||
// We free some data off of XDisplay close hooks, ensure they're
|
||||
// run. Closing the display is pretty scary, so we only do it to
|
||||
// silence leak checkers.
|
||||
XCloseDisplay(DefaultXDisplay());
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
PluginModuleChild::AnswerNP_Shutdown(NPError *rv)
|
||||
{
|
||||
|
@ -261,6 +261,7 @@ public:
|
||||
private:
|
||||
void InitQuirksModes(const nsCString& aMimeType);
|
||||
bool InitGraphics();
|
||||
void DeinitGraphics();
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
static gboolean DetectNestedEventLoop(gpointer data);
|
||||
static gboolean ProcessBrowserEvents(gpointer data);
|
||||
|
Loading…
Reference in New Issue
Block a user