summaryrefslogtreecommitdiffstats
path: root/components/breakpad/browser
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-23 11:49:47 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-23 11:49:47 +0000
commit8dd612a1cc006c197a3316e8eba0c49fd1ac5562 (patch)
tree6c779412dba09f770f1942583f4b653c25b78bb4 /components/breakpad/browser
parentc696c28ad014c9a9d141fb1a50bf7bfbd9af2036 (diff)
downloadchromium_src-8dd612a1cc006c197a3316e8eba0c49fd1ac5562.zip
chromium_src-8dd612a1cc006c197a3316e8eba0c49fd1ac5562.tar.gz
chromium_src-8dd612a1cc006c197a3316e8eba0c49fd1ac5562.tar.bz2
Linux Breakpad: Call base::GetLinuxDistro() on the right thread.
This regressed in r271640. Review URL: https://codereview.chromium.org/298803013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/breakpad/browser')
-rw-r--r--components/breakpad/browser/crash_handler_host_linux.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/components/breakpad/browser/crash_handler_host_linux.cc b/components/breakpad/browser/crash_handler_host_linux.cc
index 4eacbe8..1394ba5 100644
--- a/components/breakpad/browser/crash_handler_host_linux.cc
+++ b/components/breakpad/browser/crash_handler_host_linux.cc
@@ -300,14 +300,6 @@ void CrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) {
process_type_str[info->process_type_length] = '\0';
info->process_type = process_type_str;
- std::string distro = base::GetLinuxDistro();
- info->distro_length = distro.length();
- // Freed in CrashDumpTask().
- char* distro_str = new char[info->distro_length + 1];
- distro.copy(distro_str, info->distro_length);
- distro_str[info->distro_length] = '\0';
- info->distro = distro_str;
-
// Memory released from scoped_ptrs below are also freed in CrashDumpTask().
info->crash_keys = crash_keys.release();
#if defined(ADDRESS_SANITIZER)
@@ -344,6 +336,16 @@ void CrashHandlerHostLinux::WriteDumpFile(scoped_ptr<BreakpadInfo> info,
DCHECK(BrowserThread::GetBlockingPool()->IsRunningSequenceOnCurrentThread(
worker_pool_token_));
+ // Set |info->distro| here because base::GetLinuxDistro() needs to run on a
+ // blocking thread.
+ std::string distro = base::GetLinuxDistro();
+ info->distro_length = distro.length();
+ // Freed in CrashDumpTask().
+ char* distro_str = new char[info->distro_length + 1];
+ distro.copy(distro_str, info->distro_length);
+ distro_str[info->distro_length] = '\0';
+ info->distro = distro_str;
+
base::FilePath dumps_path("/tmp");
PathService::Get(base::DIR_TEMP, &dumps_path);
if (!info->upload)