summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorzhurunz@google.com <zhurunz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-22 05:41:50 +0000
committerzhurunz@google.com <zhurunz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-22 05:41:50 +0000
commit1fcab653da84a27ca76229bcf94fdd799cbd40c6 (patch)
tree153bca8dd000bcea29cd7411f3f42e65a32841ed /o3d/plugin
parent5e1ed6dcace94125b65e1061e2219672fda9ba1f (diff)
downloadchromium_src-1fcab653da84a27ca76229bcf94fdd799cbd40c6.zip
chromium_src-1fcab653da84a27ca76229bcf94fdd799cbd40c6.tar.gz
chromium_src-1fcab653da84a27ca76229bcf94fdd799cbd40c6.tar.bz2
Add breakpad.
Review URL: http://codereview.chromium.org/2092021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/linux/main_linux.cc9
-rw-r--r--o3d/plugin/plugin.gyp14
2 files changed, 23 insertions, 0 deletions
diff --git a/o3d/plugin/linux/main_linux.cc b/o3d/plugin/linux/main_linux.cc
index 80bd3d5..7e3ffb3 100644
--- a/o3d/plugin/linux/main_linux.cc
+++ b/o3d/plugin/linux/main_linux.cc
@@ -40,6 +40,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
+#include "o3d/breakpad/linux/breakpad.h"
#include "plugin/cross/main.h"
#include "plugin/cross/out_of_memory.h"
#include "plugin/cross/whitelist.h"
@@ -61,6 +62,8 @@ base::AtExitManager g_at_exit_manager;
bool g_xembed_support = false;
+o3d::Breakpad g_breakpad;
+
#ifdef O3D_PLUGIN_ENV_VARS_FILE
static const char *kEnvVarsFilePath = O3D_PLUGIN_ENV_VARS_FILE;
#endif
@@ -622,6 +625,10 @@ NPError InitializePlugin() {
if (!o3d::SetupOutOfMemoryHandler())
return NPERR_MODULE_LOAD_FAILED_ERROR;
+ // Setup breakpad
+ g_breakpad.Initialize();
+ g_breakpad.set_version(O3D_PLUGIN_VERSION);
+
CommandLine::Init(0, NULL);
InitLogging("debug.log",
logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG,
@@ -682,6 +689,8 @@ NPError EXPORT_SYMBOL OSCALL NP_Shutdown(void) {
CommandLine::Reset();
+ g_breakpad.Shutdown();
+
return NPERR_NO_ERROR;
}
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp
index e7092e7..503994f 100644
--- a/o3d/plugin/plugin.gyp
+++ b/o3d/plugin/plugin.gyp
@@ -267,6 +267,10 @@
],
['OS == "linux"',
{
+ 'dependencies': [
+ '../../breakpad/breakpad.gyp:breakpad_client',
+ '../breakpad/breakpad.gyp:o3dBreakpad',
+ ],
'sources': [
'linux/config.cc',
'linux/envvars.cc',
@@ -288,6 +292,7 @@
# the --as-needed flag.
'-lCgGL',
'-lGLEW',
+ '-ldl', # Used by breakpad
'-lrt',
# Directs the linker to only generate dependencies on libraries
# that we actually use. Must come last.
@@ -297,6 +302,15 @@
'<!@(pkg-config --libs-only-l xt)',
],
'conditions' : [
+ ['target_arch=="ia32"',
+ { # Used by breakpad
+ # TODO(zhurunz) Remove the deps on libglog.a
+ 'libraries': [
+ '-Lbreakpad/src/third_party/linux/lib/glog',
+ '-lglog',
+ ],
+ },
+ ],
['plugin_rpath != ""',
{
'ldflags': [