зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
42f9cd63c6
Коммит
59514e9388
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -264,6 +264,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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче