Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: chrome/app/chrome_dll_main.cc

Issue 2716007: Linux: Catch X errors and force a crash.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/x11_util.cc ('k') | chrome/gpu/gpu_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_dll_main.cc
===================================================================
--- chrome/app/chrome_dll_main.cc (revision 49446)
+++ chrome/app/chrome_dll_main.cc (working copy)
@@ -23,7 +23,7 @@
#include <unistd.h>
#endif
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#if defined(USE_X11)
#include <gdk/gdk.h>
#include <glib.h>
#include <gtk/gtk.h>
@@ -64,6 +64,10 @@
#include "base/nss_util.h"
#endif
+#if defined(USE_X11)
+#include "app/x11_util.h"
+#endif
+
#if defined(OS_LINUX)
#include "chrome/browser/renderer_host/render_sandbox_host_linux.h"
#include "chrome/browser/zygote_host_linux.h"
@@ -202,9 +206,9 @@
return (pos != std::wstring::npos);
}
-#endif // OS_WIN
+#endif // defined(OS_WIN)
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#if defined(USE_X11)
static void GLibLogHandler(const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message,
@@ -259,7 +263,9 @@
NULL);
}
}
+#endif // defined(USE_X11)
+#if defined(OS_LINUX)
static void AdjustLinuxOOMScore(const std::string& process_type) {
const int kMiscScore = 7;
const int kPluginScore = 10;
@@ -293,7 +299,7 @@
if (score > -1)
base::AdjustOOMScore(base::GetCurrentProcId(), score);
}
-#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
+#endif // defined(OS_LINUX)
// Register the invalid param handler and pure call handler to be able to
// notify breakpad when it happens.
@@ -704,8 +710,7 @@
// Update the process name (need resources to get the strings, so
// only do this when ResourcesBundle has been initialized).
SetMacProcessName(process_type);
-#endif // defined(OS_MACOSX)
-
+#endif // defined(OS_MACOSX)
}
if (!process_type.empty())
@@ -836,6 +841,8 @@
// gtk_init() can change |argc| and |argv|.
gtk_init(&argc, &argv);
SetUpGLibLogHandler();
+
+ x11_util::SetX11ErrorHandlers();
#endif // defined(OS_LINUX)
rv = BrowserMain(main_params);
« no previous file with comments | « app/x11_util.cc ('k') | chrome/gpu/gpu_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698