Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Issue 3186028: Make crash reporting client_id accessible through child_process_logging. (Closed)

Created:
10 years, 4 months ago by Mattias Nissler (ping if slow)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, John Grabowski, ben+cc_chromium.org, pam+watch_chromium.org, brettw-cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Make crash reporting client_id accessible through child_process_logging. On Mac and Linux, keep the client id in a global variable kept by the child_process_logging implementations. This allows to read it in a thread safe fashion when starting a child process. Also replace std::string with statically allocated buffers for the various items we add to the crash reports. This allows to properly handle crashes upon shutdown (std::string would run its destructor, invalidating the memory). BUG=53231 TEST=Crash reporting should still work Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57497

Patch Set 1 #

Total comments: 17

Patch Set 2 : Address feedback. #

Patch Set 3 : strlcpy is what we want :) #

Patch Set 4 : switch mac g_client_id back to char[] #

Total comments: 4

Patch Set 5 : address mark's feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -52 lines) Patch
M base/linux_util.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M base/linux_util.cc View 1 2 3 chunks +14 lines, -6 lines 0 comments Download
M chrome/app/breakpad_linux.cc View 1 7 chunks +17 lines, -35 lines 0 comments Download
M chrome/browser/browser_child_process_host.cc View 1 2 3 4 2 chunks +4 lines, -7 lines 0 comments Download
M chrome/common/child_process_logging.h View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/common/child_process_logging_linux.cc View 1 2 3 4 2 chunks +17 lines, -4 lines 0 comments Download
M chrome/common/child_process_logging_mac.mm View 1 2 3 4 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/common/child_process_logging_win.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Mattias Nissler (ping if slow)
Hi, here are some crash reporter changes. I'm not sure whether the global variables approach ...
10 years, 4 months ago (2010-08-24 19:28:02 UTC) #1
Lei Zhang
I imagine the strings holding these values are destroyed pretty late in the shutdown process, ...
10 years, 4 months ago (2010-08-24 21:05:25 UTC) #2
Mark Mentovai
http://codereview.chromium.org/3186028/diff/1/3 File base/linux_util.h (right): http://codereview.chromium.org/3186028/diff/1/3#newcode1 base/linux_util.h:1: // Copyright (c) 2010 The Chromium Authors. All rights ...
10 years, 4 months ago (2010-08-24 21:22:22 UTC) #3
Lei Zhang
http://codereview.chromium.org/3186028/diff/1/8 File chrome/common/child_process_logging_mac.mm (right): http://codereview.chromium.org/3186028/diff/1/8#newcode111 chrome/common/child_process_logging_mac.mm:111: *client_id = g_client_id; On 2010/08/24 21:22:22, Mark Mentovai wrote: ...
10 years, 4 months ago (2010-08-24 21:28:03 UTC) #4
Mark Mentovai
[email protected] wrote: > I don't know if there's any restrictions on Win/Mac, but the Linux ...
10 years, 4 months ago (2010-08-24 21:39:23 UTC) #5
Mattias Nissler (ping if slow)
Thanks for your feedback, I've put some more thoughts/explanations. Lei: Regarding the std::string dtor, I ...
10 years, 4 months ago (2010-08-24 22:31:23 UTC) #6
Mark Mentovai
[email protected] wrote: > I agree this pattern is not very nice. My reason for putting ...
10 years, 4 months ago (2010-08-25 00:20:14 UTC) #7
Mattias Nissler (ping if slow)
Here's a new version that addresses most of the feedback. http://codereview.chromium.org/3186028/diff/1/3 File base/linux_util.h (right): http://codereview.chromium.org/3186028/diff/1/3#newcode1 ...
10 years, 4 months ago (2010-08-25 10:36:44 UTC) #8
Mark Mentovai
[email protected] wrote: >> I don't know if this is needed on Mac. Perhaps the code ...
10 years, 4 months ago (2010-08-25 14:12:01 UTC) #9
Mattias Nissler (ping if slow)
On 2010/08/25 14:12:01, Mark Mentovai wrote: > mailto:[email protected] wrote: > >> I don't know if ...
10 years, 4 months ago (2010-08-25 14:28:44 UTC) #10
Mark Mentovai
LG with these changes. http://codereview.chromium.org/3186028/diff/16001/17002 File base/linux_util.h (right): http://codereview.chromium.org/3186028/diff/16001/17002#newcode19 base/linux_util.h:19: // in compromised context without ...
10 years, 4 months ago (2010-08-25 14:43:10 UTC) #11
Mattias Nissler (ping if slow)
Ok, here's an update. Waiting for thumbs up from Lei. http://codereview.chromium.org/3186028/diff/16001/17002 File base/linux_util.h (right): http://codereview.chromium.org/3186028/diff/16001/17002#newcode19 ...
10 years, 4 months ago (2010-08-25 15:12:42 UTC) #12
Lei Zhang
10 years, 4 months ago (2010-08-25 18:24:42 UTC) #13
Being 3 timezones behind Mark, this looks like the right time for a LGTM.

Powered by Google App Engine
This is Rietveld 408576698