diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 01:56:27 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 01:56:27 +0000 |
commit | f658af8bb836debbac7ca687634792d9dc6b9f87 (patch) | |
tree | f69027acb8331a93c3db63ee5017509f6b3aacd2 /chrome/plugin | |
parent | a551ebd84a64c2723cae1b1c48eef602f9c3b44b (diff) | |
download | chromium_src-f658af8bb836debbac7ca687634792d9dc6b9f87.zip chromium_src-f658af8bb836debbac7ca687634792d9dc6b9f87.tar.gz chromium_src-f658af8bb836debbac7ca687634792d9dc6b9f87.tar.bz2 |
Linux: Catch X errors and force a crash.
BUG=45020
TEST=See http://crosbug.com/3487
Review URL: http://codereview.chromium.org/2716007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49488 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/plugin_thread.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index e4fd235..774780c 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,10 +6,15 @@ #include "build/build_config.h" -#if defined(OS_LINUX) +#if defined(USE_X11) #include <gtk/gtk.h> +#elif defined(OS_MACOSX) +#include <CoreFoundation/CoreFoundation.h> #endif +#include <string> +#include <vector> + #include "base/command_line.h" #include "base/lazy_instance.h" #include "base/process_util.h" @@ -27,8 +32,9 @@ #include "webkit/glue/webkit_glue.h" #include "webkit/glue/plugins/webplugin_delegate_impl.h" -#if defined(OS_MACOSX) -#include <CoreFoundation/CoreFoundation.h> +#if defined(USE_X11) +#include "app/x11_util.h" +#elif defined(OS_MACOSX) #include "app/l10n_util.h" #include "base/mac_util.h" #include "base/scoped_cftyperef.h" @@ -79,6 +85,8 @@ PluginThread::PluginThread() free(argv[i]); } } + + x11_util::SetX11ErrorHandlers(); #endif PatchNPNFunctions(); @@ -232,4 +240,4 @@ bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { return true; } -} // namespace webkit_glue +} // namespace webkit_glue |