bug 1276086 set GLib prgname in child process r=glandium

MozReview-Commit-ID: 4Neb36zGScf

--HG--
extra : rebase_source : e9abe5b1fe76997efa5f0308cb53e22acdf33f9f
This commit is contained in:
Karl Tomlinson 2016-05-27 11:50:26 +12:00
parent 5aebf9bad8
commit 39cdd7f4f6
2 changed files with 6 additions and 0 deletions

View File

@ -643,6 +643,8 @@ ContentChild::Init(MessageLoop* aIOLoop,
int argc = 3;
char option_name[] = "--display";
char* argv[] = {
// argv0 is unused because g_set_prgname() was called in
// XRE_InitChildProcess().
nullptr,
option_name,
display_name,

View File

@ -487,6 +487,10 @@ XRE_InitChildProcess(int aArgc,
#if MOZ_WIDGET_GTK == 2
XRE_GlibInit();
#endif
#ifdef MOZ_WIDGET_GTK
// Setting the name here avoids the need to pass this through to gtk_init().
g_set_prgname(aArgv[0]);
#endif
#if defined(MOZ_WIDGET_QT)
nsQAppInstance::AddRef();