From cf6e6c5c1866a27d5e4bae1d5f912129c6ad4bdc Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 19 Oct 2009 11:28:42 -0500 Subject: [PATCH] bug 521324: call the multi-threaded GLib initialization function. r=karlt --- ipc/glue/RPCChannel.cpp | 2 +- toolkit/xre/nsEmbedFunctions.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ipc/glue/RPCChannel.cpp b/ipc/glue/RPCChannel.cpp index 92ff0ad0de8..c03f455deb7 100644 --- a/ipc/glue/RPCChannel.cpp +++ b/ipc/glue/RPCChannel.cpp @@ -349,7 +349,7 @@ RPCChannel::DebugAbort(const char* file, int line, const char* cond, const char* type, bool reply) { fprintf(stderr, - "[RPCChannel][%s][%s:%d] " + "###!!! [RPCChannel][%s][%s:%d] " "Assertion (%s) failed. %s (triggered by %s%s)\n", mChild ? "Child" : "Parent", file, line, cond, diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp index 45a40b17229..3a2f7fd45bf 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -40,6 +40,9 @@ #include "nsXULAppAPI.h" #include +#if defined(MOZ_WIDGET_GTK2) +#include +#endif #include "prenv.h" @@ -257,6 +260,10 @@ XRE_InitChildProcess(int aArgc, NS_ENSURE_ARG_POINTER(aArgv); NS_ENSURE_ARG_POINTER(aArgv[0]); +#if defined(MOZ_WIDGET_GTK2) + g_thread_init(NULL); +#endif + if (PR_GetEnv("MOZ_DEBUG_CHILD_PROCESS")) { #ifdef OS_POSIX printf("\n\nCHILDCHILDCHILDCHILD\n debug me @%d\n\n", getpid());