Bug 1159273 - call g_type_init in nsAppShell::Init. r=glandium

This commit is contained in:
Lee Salzman 2015-05-12 07:13:04 -04:00 committed by Mike Hommey
parent 425452c4a9
commit 282e131375

View File

@ -73,6 +73,12 @@ nsAppShell::~nsAppShell()
nsresult
nsAppShell::Init()
{
// For any versions of Glib before 2.36, g_type_init must be explicitly called
// to safely use the library. Failure to do so may cause various failures/crashes
// in any code that uses Glib, Gdk, or Gtk. In later versions of Glib, this call
// is a no-op.
g_type_init();
if (!gWidgetLog)
gWidgetLog = PR_NewLogModule("Widget");
if (!gWidgetFocusLog)