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

Issue 2393853002: Refactor CrashDump*Manager to use a shared CrashDumpObserver singleton. (Closed)

Created:
4 years, 2 months ago by Tobias Sargeant
Modified:
3 years, 2 months ago
CC:
alokp+watch_chromium.org, android-webview-reviews_chromium.org, boliu, chromium-reviews, darin-cc_chromium.org, einbinder+watch-test-runner_chromium.org, halliwell+watch_chromium.org, jochen+watch_chromium.org, kalyank, lcwu+watch_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, Peter Beverloo, sadrul
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor CrashDump*Manager to use a shared CrashDumpObserver singleton. CrashDumpManager watches for generated microdumps when child processes die, and CrashMicroDumpManager is responsible for aborting the WebView browser process. Both share similarities that can be combined, and doing so allows us to eventually support generating a minidump and then dying in WebView. BUG=633979 Review-Url: https://codereview.chromium.org/2393853002 Cr-Commit-Position: refs/heads/master@{#442539} Committed: https://chromium.googlesource.com/chromium/src/+/5b457a448b5f4c2e4fb620f39a495e35fef486c5

Patch Set 1 #

Patch Set 2 : Cleanups, pre re-review #

Total comments: 13

Patch Set 3 : use a LazyInstance, have BrowserMainParts own clients, not observer #

Patch Set 4 : fix initialization in ShellBrowserMainParts #

Total comments: 39

Patch Set 5 : rebase; review changes #

Total comments: 2

Patch Set 6 : Review changes: remove refcounting, ability to unregister clients, move responsibility for posting to clients #

Total comments: 8

Patch Set 7 : Make posted task methods static. Fix nits in #44 #

Patch Set 8 : minor diff cleanups, reinstate ChromeBrowserMainPartsAndroid dtor #

Total comments: 6

Patch Set 9 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+488 lines, -435 lines) Patch
M android_webview/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/browser/aw_browser_main_parts.cc View 1 2 3 4 5 3 chunks +5 lines, -2 lines 0 comments Download
A android_webview/browser/aw_browser_terminator.h View 1 2 3 4 5 6 1 chunk +54 lines, -0 lines 0 comments Download
A android_webview/browser/aw_browser_terminator.cc View 1 2 3 4 5 6 1 chunk +87 lines, -0 lines 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/chrome_browser_main_android.h View 1 2 3 4 5 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/browser/chrome_browser_main_android.cc View 1 2 3 4 5 6 7 3 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -12 lines 0 comments Download
M chromecast/browser/cast_browser_main_parts.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -2 lines 0 comments Download
M chromecast/browser/cast_browser_process.h View 3 chunks +0 lines, -11 lines 0 comments Download
M chromecast/browser/cast_browser_process.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M chromecast/browser/cast_content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -13 lines 0 comments Download
M components/crash/content/browser/BUILD.gn View 1 chunk +2 lines, -2 lines 0 comments Download
M components/crash/content/browser/crash_dump_manager_android.h View 1 2 3 4 5 6 3 chunks +19 lines, -44 lines 0 comments Download
M components/crash/content/browser/crash_dump_manager_android.cc View 1 2 3 4 5 6 7 8 chunks +25 lines, -103 lines 0 comments Download
A components/crash/content/browser/crash_dump_observer_android.h View 1 2 3 4 5 6 1 chunk +109 lines, -0 lines 0 comments Download
A components/crash/content/browser/crash_dump_observer_android.cc View 1 2 3 4 5 6 1 chunk +154 lines, -0 lines 0 comments Download
D components/crash/content/browser/crash_micro_dump_manager_android.h View 1 chunk +0 lines, -69 lines 0 comments Download
D components/crash/content/browser/crash_micro_dump_manager_android.cc View 1 chunk +0 lines, -129 lines 0 comments Download
M content/shell/browser/shell_browser_main_parts.h View 1 2 3 4 5 2 chunks +0 lines, -9 lines 0 comments Download
M content/shell/browser/shell_browser_main_parts.cc View 1 2 3 4 5 3 chunks +6 lines, -1 line 0 comments Download
M content/shell/browser/shell_content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -12 lines 0 comments Download

Messages

Total messages: 79 (51 generated)
Tobias Sargeant
Hi Lei, I'd like to revive this CL. The original CL that got reverted is ...
4 years, 2 months ago (2016-10-05 11:16:30 UTC) #2
Lei Zhang
The problems found in https://codereview.chromium.org/2304733002/ look like they got addressed, so I would recommend going ...
4 years, 2 months ago (2016-10-05 16:57:45 UTC) #7
Tobias Sargeant
On 2016/10/05 16:57:45, Lei Zhang wrote: > The problems found in https://codereview.chromium.org/2304733002/ look like they ...
4 years, 2 months ago (2016-10-05 17:20:03 UTC) #8
Lei Zhang
Looks ok. https://codereview.chromium.org/2393853002/diff/20001/components/crash/content/browser/crash_dump_manager_android.cc File components/crash/content/browser/crash_dump_manager_android.cc (left): https://codereview.chromium.org/2393853002/diff/20001/components/crash/content/browser/crash_dump_manager_android.cc#oldcode94 components/crash/content/browser/crash_dump_manager_android.cc:94: DCHECK_CURRENTLY_ON(BrowserThread::FILE); I'm curious what thread CrashDumpManager actually ...
4 years, 2 months ago (2016-10-05 18:00:00 UTC) #9
Tobias Sargeant
https://codereview.chromium.org/2393853002/diff/20001/components/crash/content/browser/crash_dump_manager_android.cc File components/crash/content/browser/crash_dump_manager_android.cc (left): https://codereview.chromium.org/2393853002/diff/20001/components/crash/content/browser/crash_dump_manager_android.cc#oldcode94 components/crash/content/browser/crash_dump_manager_android.cc:94: DCHECK_CURRENTLY_ON(BrowserThread::FILE); On 2016/10/05 18:00:00, Lei Zhang wrote: > I'm ...
4 years, 2 months ago (2016-10-06 17:42:22 UTC) #10
Tobias Sargeant
Adding back initial reviewers. This CL is largely the same as https://codereview.chromium.org/2200693002/, but with some ...
4 years, 2 months ago (2016-10-13 12:52:14 UTC) #30
boliu
https://codereview.chromium.org/2393853002/diff/20001/components/crash/content/browser/crash_dump_observer_android.h File components/crash/content/browser/crash_dump_observer_android.h (right): https://codereview.chromium.org/2393853002/diff/20001/components/crash/content/browser/crash_dump_observer_android.h#newcode87 components/crash/content/browser/crash_dump_observer_android.h:87: static CrashDumpObserver* instance_; On 2016/10/13 12:52:14, Tobias Sargeant wrote: ...
4 years, 2 months ago (2016-10-13 21:07:19 UTC) #31
boliu
https://codereview.chromium.org/2393853002/diff/100001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2393853002/diff/100001/chrome/browser/chrome_content_browser_client.cc#newcode2781 chrome/browser/chrome_content_browser_client.cc:2781: breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( On 2016/10/13 21:07:18, boliu wrote: > so now ...
4 years, 2 months ago (2016-10-13 21:08:50 UTC) #32
Bernhard Bauer
https://codereview.chromium.org/2393853002/diff/100001/android_webview/browser/aw_browser_terminator.cc File android_webview/browser/aw_browser_terminator.cc (right): https://codereview.chromium.org/2393853002/diff/100001/android_webview/browser/aw_browser_terminator.cc#newcode33 android_webview/browser/aw_browser_terminator.cc:33: std::unique_ptr<base::SyncSocket> local_pipe(new base::SyncSocket()); auto local_pipe = base::MakeUnique<base::SyncSocket>()? :) https://codereview.chromium.org/2393853002/diff/100001/chromecast/browser/cast_browser_main_parts.h ...
4 years, 2 months ago (2016-10-14 10:41:02 UTC) #33
michaelbai
https://codereview.chromium.org/2393853002/diff/120001/components/crash/content/browser/crash_dump_observer_android.cc File components/crash/content/browser/crash_dump_observer_android.cc (right): https://codereview.chromium.org/2393853002/diff/120001/components/crash/content/browser/crash_dump_observer_android.cc#newcode67 components/crash/content/browser/crash_dump_observer_android.cc:67: pool->PostSequencedWorkerTask( WebView wants know this immediately, sets all WebView ...
4 years ago (2016-11-29 23:31:32 UTC) #35
Tobias Sargeant
In order to remove the refcounting of clients (which I agree is a better decision), ...
4 years ago (2016-12-08 16:41:42 UTC) #43
Bernhard Bauer
Thanks! LGTM with nits: https://codereview.chromium.org/2393853002/diff/200001/android_webview/browser/aw_browser_terminator.cc File android_webview/browser/aw_browser_terminator.cc (right): https://codereview.chromium.org/2393853002/diff/200001/android_webview/browser/aw_browser_terminator.cc#newcode83 android_webview/browser/aw_browser_terminator.cc:83: base::Bind(&AwBrowserTerminator::ProcessTerminationStatus, Nit: Things have slightly ...
4 years ago (2016-12-08 17:41:25 UTC) #44
Tobias Sargeant
https://codereview.chromium.org/2393853002/diff/200001/android_webview/browser/aw_browser_terminator.cc File android_webview/browser/aw_browser_terminator.cc (right): https://codereview.chromium.org/2393853002/diff/200001/android_webview/browser/aw_browser_terminator.cc#newcode83 android_webview/browser/aw_browser_terminator.cc:83: base::Bind(&AwBrowserTerminator::ProcessTerminationStatus, On 2016/12/08 17:41:25, Bernhard Bauer wrote: > Nit: ...
4 years ago (2016-12-12 11:49:52 UTC) #45
Torne
lgtm
4 years ago (2016-12-13 18:04:03 UTC) #54
Tobias Sargeant
Robert, could you please take a look at components/crash?
4 years ago (2016-12-14 10:50:54 UTC) #56
Robert Sesek
https://codereview.chromium.org/2393853002/diff/240001/components/crash/content/browser/crash_dump_observer_android.h File components/crash/content/browser/crash_dump_observer_android.h (right): https://codereview.chromium.org/2393853002/diff/240001/components/crash/content/browser/crash_dump_observer_android.h#newcode53 components/crash/content/browser/crash_dump_observer_android.h:53: // Create (on the UI thread), and lives until ...
4 years ago (2016-12-14 22:44:14 UTC) #57
Tobias Sargeant
https://codereview.chromium.org/2393853002/diff/240001/components/crash/content/browser/crash_dump_observer_android.h File components/crash/content/browser/crash_dump_observer_android.h (right): https://codereview.chromium.org/2393853002/diff/240001/components/crash/content/browser/crash_dump_observer_android.h#newcode53 components/crash/content/browser/crash_dump_observer_android.h:53: // Create (on the UI thread), and lives until ...
4 years ago (2016-12-15 14:59:48 UTC) #58
Robert Sesek
LGTM https://codereview.chromium.org/2393853002/diff/240001/components/crash/content/browser/crash_dump_observer_android.h File components/crash/content/browser/crash_dump_observer_android.h (right): https://codereview.chromium.org/2393853002/diff/240001/components/crash/content/browser/crash_dump_observer_android.h#newcode53 components/crash/content/browser/crash_dump_observer_android.h:53: // Create (on the UI thread), and lives ...
4 years ago (2016-12-15 17:10:57 UTC) #59
Tobias Sargeant
halliwell@, could you please take a look at chromecast/ mkwst@, could you please take a ...
4 years ago (2016-12-16 11:45:05 UTC) #60
michaelbai
https://codereview.chromium.org/2393853002/diff/240001/android_webview/browser/aw_browser_terminator.cc File android_webview/browser/aw_browser_terminator.cc (right): https://codereview.chromium.org/2393853002/diff/240001/android_webview/browser/aw_browser_terminator.cc#newcode44 android_webview/browser/aw_browser_terminator.cc:44: void AwBrowserTerminator::ProcessTerminationStatus( Is it better to declare this method ...
3 years, 11 months ago (2017-01-05 22:42:48 UTC) #61
Mike West
//content/shell LGTM (happy holidays! sorry for the delayed response)
3 years, 11 months ago (2017-01-09 08:54:34 UTC) #62
Tobias Sargeant
https://codereview.chromium.org/2393853002/diff/240001/android_webview/browser/aw_browser_terminator.cc File android_webview/browser/aw_browser_terminator.cc (right): https://codereview.chromium.org/2393853002/diff/240001/android_webview/browser/aw_browser_terminator.cc#newcode44 android_webview/browser/aw_browser_terminator.cc:44: void AwBrowserTerminator::ProcessTerminationStatus( On 2017/01/05 22:42:48, michaelbai wrote: > Is ...
3 years, 11 months ago (2017-01-09 18:19:25 UTC) #63
Tobias Sargeant
halliwell@ or alokp@, would you mind looking at //chromecast please? That's the last piece that ...
3 years, 11 months ago (2017-01-09 18:23:12 UTC) #65
michaelbai
https://codereview.chromium.org/2393853002/diff/240001/android_webview/browser/aw_browser_terminator.cc File android_webview/browser/aw_browser_terminator.cc (right): https://codereview.chromium.org/2393853002/diff/240001/android_webview/browser/aw_browser_terminator.cc#newcode44 android_webview/browser/aw_browser_terminator.cc:44: void AwBrowserTerminator::ProcessTerminationStatus( On 2017/01/09 18:19:24, Tobias Sargeant wrote: > ...
3 years, 11 months ago (2017-01-09 18:49:54 UTC) #68
alokp
chromecast/ lgtm
3 years, 11 months ago (2017-01-10 00:05:30 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2393853002/260001
3 years, 11 months ago (2017-01-10 09:27:05 UTC) #74
commit-bot: I haz the power
Committed patchset #9 (id:260001) as https://chromium.googlesource.com/chromium/src/+/5b457a448b5f4c2e4fb620f39a495e35fef486c5
3 years, 11 months ago (2017-01-10 09:35:48 UTC) #77
mfarrar03
3 years, 2 months ago (2017-09-26 02:50:30 UTC) #79
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698