#if defined(OS_POSIX)
# include "base/message_pump_libevent.h"
#endif
-#if defined(OS_LINUX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_BSD)|| defined(OS_HURD)
# if defined(MOZ_WIDGET_GTK)
# include "base/message_pump_glib.h"
# endif
if (type_ == TYPE_UI) {
# if defined(OS_MACOSX)
pump_ = base::MessagePumpMac::Create();
-# elif defined(OS_LINUX) || defined(OS_BSD)
+# elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_HURD)
pump_ = new base::MessagePumpForUI();
# endif // OS_LINUX
} else if (type_ == TYPE_IO) {
# define OS_MACOSX 1
#elif defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)
# define OS_LINUX 1
+# define OS_HURD 1
#elif defined(__DragonFly__)
# define OS_DRAGONFLY 1
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
// For access to standard POSIX features, use OS_POSIX instead of a more
// specific macro.
#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
- defined(OS_SOLARIS)
+ defined(OS_SOLARIS) || defined(OS_HURD)
# define OS_POSIX 1
#endif
}
#endif // MOZ_WIDGET_GTK
-#ifdef OS_POSIX
+#if defined(OS_POSIX) || defined(OS_HURD)
bool PosixProcessLauncher::DoSetup() {
if (!BaseProcessLauncher::DoSetup()) {
return false;
}
+//--------------------------------------------------
+ // For POSIX, we have to be extremely anal about *not* using
+ // std::wstring in code compiled with Mozilla's -fshort-wchar
+ // configuration, because chromium is compiled with -fno-short-wchar
+ // and passing wstrings from one config to the other is unsafe. So
+ // we split the logic here.
+
+# if defined(MOZ_WIDGET_GTK)
+ if (mProcessType == GeckoProcessType_Content) {
+ // disable IM module to avoid sandbox violation
+ mLaunchOptions->env_map["GTK_IM_MODULE"] = "gtk-im-context-simple";
+
+ // Disable ATK accessibility code in content processes because it conflicts
+ // with the sandbox, and we proxy that information through the main process
+ // anyway.
+ mLaunchOptions->env_map["NO_AT_BRIDGE"] = "1";
+ }
+# endif // defined(MOZ_WIDGET_GTK)
+
// XPCOM may not be initialized in some subprocesses. We don't want
// to initialize XPCOM just for the directory service, especially
// since LD_LIBRARY_PATH is already set correctly in subprocesses
MOZ_ASSERT(gGREBinPath);
nsCString path;
NS_CopyUnicodeToNative(nsDependentString(gGREBinPath), path);
-# if defined(OS_LINUX) || defined(OS_BSD)
+# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_HURD)
const char* ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
nsCString new_ld_lib_path(path.get());
mChildArgv.push_back(mPidString);
if (!CrashReporter::IsDummy()) {
-# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) || defined(OS_HURD)
int childCrashFd, childCrashRemapFd;
if (!CrashReporter::CreateNotificationPipeForChild(&childCrashFd,
&childCrashRemapFd)) {