diff options
author | cstefansen@google.com <cstefansen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 18:27:37 +0000 |
---|---|---|
committer | cstefansen@google.com <cstefansen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 18:27:37 +0000 |
commit | 6784252af99d1da6c63871374d9409998c64ef5b (patch) | |
tree | b143523926a953dd1383ef0819b996ca585c8e19 /chrome/nacl | |
parent | 08392d8b0ddf22814b3e4c7aed44281ff3a9bee6 (diff) | |
download | chromium_src-6784252af99d1da6c63871374d9409998c64ef5b.zip chromium_src-6784252af99d1da6c63871374d9409998c64ef5b.tar.gz chromium_src-6784252af99d1da6c63871374d9409998c64ef5b.tar.bz2 |
Enable Breakpad for crashes in trusted code in Native Client on Chrome for Linux.
This change ensures that the appropriate command line flag (SetCrashReporterCommandLine())
is set for the NaCl process and read by the NaCl main process when it starts.
TEST=
0. Ensure that Native Client is DEPS'ed in at revision 4097 or higher
1. From src/ issue
./build/gyp_chromim -f make -dlinux_breakpad=1
2. Build Chromium (debug build)
3. With env. variable CHROME_HEADLESS=1 and NACL_CRASH_TEST=1 run
out/Debug/chrome --enable-nacl --enable-crash-reporter
4. Visit a page that attempts to load a NaCl module, e.g.,
http://naclports.googlecode.com/svn/trunk/src/gallery/index.html
5. Observe that a .dmp file is created in ~/.config/chromium/Crash\ Reports/
BUG= http://code.google.com/p/nativeclient/issues/detail?id=206
Review URL: http://codereview.chromium.org/6193005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl')
-rw-r--r-- | chrome/nacl/DEPS | 1 | ||||
-rw-r--r-- | chrome/nacl/nacl_main.cc | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/chrome/nacl/DEPS b/chrome/nacl/DEPS index c2468b9..dcb9c32 100644 --- a/chrome/nacl/DEPS +++ b/chrome/nacl/DEPS @@ -6,6 +6,7 @@ include_rules = [ # sandbox support code out of chrome/renderer. (Previously, this # header was #included from the native_client directory, which was # worse.) + "+chrome/app", "+chrome/renderer", "+chrome/test", "+sandbox/src", diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc index f039538..0e63273 100644 --- a/chrome/nacl/nacl_main.cc +++ b/chrome/nacl/nacl_main.cc @@ -13,6 +13,11 @@ #include "base/command_line.h" #include "base/message_loop.h" #include "base/string_util.h" + +#if defined(USE_LINUX_BREAKPAD) +#include "chrome/app/breakpad_linux.h" +#endif + #include "chrome/common/child_process.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" @@ -90,6 +95,10 @@ static void HandleNaClTestParameters(const CommandLine& command_line) { // main() routine for the NaCl loader process. int NaClMain(const MainFunctionParams& parameters) { +#if defined(USE_LINUX_BREAKPAD) + // Needs to be called after we have chrome::DIR_USER_DATA. + InitCrashReporter(); +#endif const CommandLine& parsed_command_line = parameters.command_line_; // This function allows pausing execution using the --nacl-startup-dialog |