Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Issue 1481703002: win: Move Crashpad all into chrome.exe (Closed)

Created:
5 years ago by scottmg
Modified:
5 years ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

win: Move Crashpad all into chrome.exe This initializes Crashpad much earlier at the beginning of WinMain, which captures early crashes about as well as we can. It also removes all Crashpad code from chrome.dll and chrome_child.dll. The cost for this is one thunk function that's looked up in crash_upload_list_crashpad.cc to get back into chrome.exe (for its global ChromeCrashReporterClient). That part is a little icky, but I think it's worthwhile to get initialization before anything in the DLL is run. R=cpu@chromium.org, mark@chromium.org BUG=546288, 561653, 564328 Committed: https://chromium.googlesource.com/chromium/src/+/cae6b0ec5d499bb49dc0591087b8bc16b4ae339a

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : initialize in test binaries #

Patch Set 4 : rebase #

Patch Set 5 : gn build #

Patch Set 6 : rebase #

Total comments: 9

Patch Set 7 : bug link and mac build #

Patch Set 8 : tests #

Total comments: 15

Patch Set 9 : no atexitmanager, don't pass vector cross module #

Patch Set 10 : restore watcher code #

Patch Set 11 : breakpad_dump_location, revert test change #

Total comments: 8

Patch Set 12 : fixes #

Patch Set 13 : isolate #

Patch Set 14 : more fixes #

Patch Set 15 : mostly back to pathservice #

Patch Set 16 : unnecessary includes #

Total comments: 4

Patch Set 17 : . #

Total comments: 10

Patch Set 18 : link fixes #

Patch Set 19 : fix and rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -73 lines) Patch
M chrome/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/app/chrome_crash_reporter_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +18 lines, -0 lines 0 comments Download
M chrome/app/chrome_exe_main_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +57 lines, -33 lines 0 comments Download
M chrome/app/chrome_main_delegate.cc View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -12 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/crash_upload_list.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/crash_upload_list_crashpad.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/crash_upload_list_crashpad.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +38 lines, -2 lines 0 comments Download
M chrome/browser_tests.isolate View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_dll.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +1 line, -7 lines 0 comments Download
M chrome/chrome_exe.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_paths.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/sync_integration_tests.isolate View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -1 line 0 comments Download
M chrome/test/base/chrome_test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +13 lines, -3 lines 0 comments Download
M components/crash/content/app/crashpad_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 61 (28 generated)
scottmg
Should have just done this originally, much better to have it all done up front. ...
5 years ago (2015-11-26 00:54:48 UTC) #10
cpu_(ooo_6.6-7.5)
looks like somebody reverted crashpad?
5 years ago (2015-11-30 23:47:40 UTC) #12
Mark Mentovai
Yeah, Scott did! But it’ll hopefully reland soon… I’m treating this one as on ice ...
5 years ago (2015-12-01 00:03:06 UTC) #13
scottmg
On 2015/12/01 00:03:06, Mark Mentovai wrote: > Yeah, Scott did! But it’ll hopefully reland soon… ...
5 years ago (2015-12-01 01:37:07 UTC) #15
scottmg
On 2015/12/01 00:03:06, Mark Mentovai wrote: > Yeah, Scott did! But it’ll hopefully reland soon… ...
5 years ago (2015-12-01 01:37:16 UTC) #16
Mark Mentovai
Handler startup and registration happen almost as early as possible now. Great! I don’t see ...
5 years ago (2015-12-02 03:05:07 UTC) #18
scottmg
On 2015/12/02 03:05:07, Mark Mentovai wrote: > Handler startup and registration happen almost as early ...
5 years ago (2015-12-02 05:33:42 UTC) #20
scottmg
Still fiddling with initialization order in the test binaries unfortunately. https://codereview.chromium.org/1481703002/diff/180001/chrome/app/chrome_exe_main_win.cc File chrome/app/chrome_exe_main_win.cc (right): https://codereview.chromium.org/1481703002/diff/180001/chrome/app/chrome_exe_main_win.cc#newcode193 ...
5 years ago (2015-12-02 05:35:01 UTC) #21
Mark Mentovai
https://codereview.chromium.org/1481703002/diff/180001/chrome/browser/crash_upload_list_crashpad.cc File chrome/browser/crash_upload_list_crashpad.cc (right): https://codereview.chromium.org/1481703002/diff/180001/chrome/browser/crash_upload_list_crashpad.cc#newcode51 chrome/browser/crash_upload_list_crashpad.cc:51: GetUploadedReportsThunk(&uploaded_reports); scottmg wrote: > I thought it was a ...
5 years ago (2015-12-02 14:59:23 UTC) #22
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/1481703002/diff/240001/chrome/app/chrome_exe_main_win.cc File chrome/app/chrome_exe_main_win.cc (right): https://codereview.chromium.org/1481703002/diff/240001/chrome/app/chrome_exe_main_win.cc#newcode138 chrome/app/chrome_exe_main_win.cc:138: DCHECK_EQ(command_line.GetSwitchValueASCII(switches::kProcessType), I don't know if we can use dchecks ...
5 years ago (2015-12-02 19:12:26 UTC) #23
scottmg
Sorry for the churn, but I think it's better to try to avoid the AtExitManager ...
5 years ago (2015-12-02 21:57:30 UTC) #25
Mark Mentovai
https://codereview.chromium.org/1481703002/diff/240001/chrome/app/chrome_exe_main_win.cc File chrome/app/chrome_exe_main_win.cc (right): https://codereview.chromium.org/1481703002/diff/240001/chrome/app/chrome_exe_main_win.cc#newcode138 chrome/app/chrome_exe_main_win.cc:138: DCHECK_EQ(command_line.GetSwitchValueASCII(switches::kProcessType), scottmg wrote: > Oh good point. It's definitely ...
5 years ago (2015-12-02 22:01:04 UTC) #26
scottmg
https://codereview.chromium.org/1481703002/diff/240001/chrome/app/chrome_exe_main_win.cc File chrome/app/chrome_exe_main_win.cc (right): https://codereview.chromium.org/1481703002/diff/240001/chrome/app/chrome_exe_main_win.cc#newcode138 chrome/app/chrome_exe_main_win.cc:138: DCHECK_EQ(command_line.GetSwitchValueASCII(switches::kProcessType), On 2015/12/02 22:01:04, Mark Mentovai wrote: > scottmg ...
5 years ago (2015-12-02 22:28:28 UTC) #27
Mark Mentovai
Overall this LGTM now. https://codereview.chromium.org/1481703002/diff/320001/chrome/app/chrome_crash_reporter_client.cc File chrome/app/chrome_crash_reporter_client.cc (right): https://codereview.chromium.org/1481703002/diff/320001/chrome/app/chrome_crash_reporter_client.cc#newcode287 chrome/app/chrome_crash_reporter_client.cc:287: if (GetAlternativeCrashDumpLocation(crash_dir)) This slurps a ...
5 years ago (2015-12-02 22:47:12 UTC) #28
scottmg
Thanks! In the continuing saga of the Last Few Tests, I'm going around in circles. ...
5 years ago (2015-12-03 01:40:15 UTC) #29
scottmg
Should have followed that thought about PathService/AtExitManager earlier. Much less fiddling with base_paths, and everything ...
5 years ago (2015-12-03 05:08:02 UTC) #30
Mark Mentovai
https://codereview.chromium.org/1481703002/diff/420001/chrome/app/chrome_crash_reporter_client.cc File chrome/app/chrome_crash_reporter_client.cc (right): https://codereview.chromium.org/1481703002/diff/420001/chrome/app/chrome_crash_reporter_client.cc#newcode284 chrome/app/chrome_crash_reporter_client.cc:284: // the chrome's PathService entries (for DIR_CRASH_DUMPS) being available ...
5 years ago (2015-12-03 15:11:32 UTC) #31
scottmg
https://codereview.chromium.org/1481703002/diff/420001/chrome/app/chrome_crash_reporter_client.cc File chrome/app/chrome_crash_reporter_client.cc (right): https://codereview.chromium.org/1481703002/diff/420001/chrome/app/chrome_crash_reporter_client.cc#newcode284 chrome/app/chrome_crash_reporter_client.cc:284: // the chrome's PathService entries (for DIR_CRASH_DUMPS) being available ...
5 years ago (2015-12-03 18:14:51 UTC) #32
Mark Mentovai
This just keeps getting better and better, but the LGTM still stands. https://codereview.chromium.org/1481703002/diff/440001/chrome/app/chrome_crash_reporter_client.cc File chrome/app/chrome_crash_reporter_client.cc ...
5 years ago (2015-12-03 20:35:43 UTC) #33
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/1481703002/diff/440001/base/path_service.cc File base/path_service.cc (left): https://codereview.chromium.org/1481703002/diff/440001/base/path_service.cc#oldcode139 base/path_service.cc:139: }; go ahead and land this /base change in ...
5 years ago (2015-12-03 20:41:08 UTC) #34
scottmg
Thanks https://codereview.chromium.org/1481703002/diff/440001/base/path_service.cc File base/path_service.cc (left): https://codereview.chromium.org/1481703002/diff/440001/base/path_service.cc#oldcode139 base/path_service.cc:139: }; On 2015/12/03 20:41:08, cpu wrote: > go ...
5 years ago (2015-12-03 20:52:52 UTC) #35
cpu_(ooo_6.6-7.5)
back when I was one of about 3 peeps poking chrome.exe code I had strict ...
5 years ago (2015-12-03 20:53:27 UTC) #36
scottmg
Thanks! (Rebased on https://codereview.chromium.org/1487213004/). https://codereview.chromium.org/1481703002/diff/440001/chrome/app/chrome_crash_reporter_client.cc File chrome/app/chrome_crash_reporter_client.cc (right): https://codereview.chromium.org/1481703002/diff/440001/chrome/app/chrome_crash_reporter_client.cc#newcode289 chrome/app/chrome_crash_reporter_client.cc:289: BrowserDistribution* dist = BrowserDistribution::GetDistribution(); On ...
5 years ago (2015-12-03 21:06:23 UTC) #37
scottmg
On 2015/12/03 20:53:27, cpu wrote: > back when I was one of about 3 peeps ...
5 years ago (2015-12-03 21:09:43 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1481703002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1481703002/480001
5 years ago (2015-12-03 23:17:33 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1481703002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1481703002/480001
5 years ago (2015-12-04 00:09:43 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1481703002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1481703002/480001
5 years ago (2015-12-04 00:14:23 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1481703002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1481703002/480001
5 years ago (2015-12-04 00:40:00 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) android_chromium_gn_compile_dbg on ...
5 years ago (2015-12-04 01:23:37 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1481703002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1481703002/480001
5 years ago (2015-12-04 01:28:44 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1481703002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1481703002/480001
5 years ago (2015-12-04 03:19:09 UTC) #57
commit-bot: I haz the power
Patchset 19 (id:??) landed as https://crrev.com/cae6b0ec5d499bb49dc0591087b8bc16b4ae339a Cr-Commit-Position: refs/heads/master@{#363097}
5 years ago (2015-12-04 03:26:20 UTC) #59
scottmg
5 years ago (2015-12-04 03:26:53 UTC) #61
Message was sent while issue was closed.
Committed patchset #19 (id:480001) manually as
cae6b0ec5d499bb49dc0591087b8bc16b4ae339a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698