]> khamidou — GitHub mirrors - electron.git/commitdiff
mac: Store crash dumps under /tmp/ProductName Crashes/.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 24 Nov 2013 15:42:54 +0000 (23:42 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 24 Nov 2013 15:42:54 +0000 (23:42 +0800)
If we put them under ~/Library/ then we need to clean them, which makes
things more complicated.

common/crash_reporter/crash_reporter_mac.mm

index dac77e79234026736ec8a454bae027ca281f3c6f..e43b7bb9dc6d1c0cd6b7ff41b2fa915d2e90a54d 100644 (file)
@@ -49,6 +49,11 @@ void CrashReporterMac::InitBreakpad(const std::string& product_name,
   // Report all crashes (important for testing the crash reporter).
   [parameters setValue:@"0" forKey:@BREAKPAD_REPORT_INTERVAL];
 
+  // Put dump files under "/tmp/ProductName Crashes".
+  std::string dump_dir = "/tmp/" + product_name + " Crashes";
+  [parameters setValue:base::SysUTF8ToNSString(dump_dir)
+                forKey:@BREAKPAD_DUMP_DIRECTORY];
+
   breakpad_ = BreakpadCreate(parameters);
 
   for (StringMap::const_iterator iter = upload_parameters_.begin();