diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-02 15:02:35 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-02 15:02:35 +0000 |
commit | bbb455eb793c9a3e76b2f6db4917afe04272583e (patch) | |
tree | 386e0106425bfedd3e83d8a2263fc360df36a10c /chrome/app/chrome_dll_main.cc | |
parent | 4e744f363cf16dc0e1fc7762f901721e4e249cda (diff) | |
download | chromium_src-bbb455eb793c9a3e76b2f6db4917afe04272583e.zip chromium_src-bbb455eb793c9a3e76b2f6db4917afe04272583e.tar.gz chromium_src-bbb455eb793c9a3e76b2f6db4917afe04272583e.tar.bz2 |
Don't fatal error when GTK fails to load a 64-bit IME.
This prevents crash on startup if you have IMEs configured.
Patch from Fumitoshi Ukai.
BUG=9643
Review URL: http://codereview.chromium.org/56176
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 46bd0ff..8cc1e93 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -18,6 +18,7 @@ #endif #if defined(OS_LINUX) +#include <string.h> #include <gtk/gtk.h> #endif @@ -159,16 +160,24 @@ bool IncorrectChromeHtmlArguments(const std::wstring& command_line) { #endif // OS_WIN #if defined(OS_LINUX) -static void GLibFatalLogHandler(const gchar* log_domain, - GLogLevelFlags log_level, - const gchar* message, - gpointer userdata) { +static void GLibLogHandler(const gchar* log_domain, + GLogLevelFlags log_level, + const gchar* message, + gpointer userdata) { if (!log_domain) log_domain = "<unknown>"; if (!message) message = "<no message>"; - LOG(FATAL) << log_domain << ": " << message; + // http://code.google.com/p/chromium/issues/detail?id=9643 + // Until we have a real 64-bit build or all of these 32-bit package issues + // are sorted out, don't fatal on ELF 32/64-bit mismatch warnings. + if (strstr(message, "Loading IM context type") || + strstr(message, "wrong ELF class: ELFCLASS64")) { + LOG(ERROR) << "Bug 9643: " << log_domain << ": " << message; + } else { + LOG(FATAL) << log_domain << ": " << message; + } } static void SetUpGLibLogHandler() { @@ -181,7 +190,7 @@ static void SetUpGLibLogHandler() { G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING), - GLibFatalLogHandler, + GLibLogHandler, NULL); } } |