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

Issue 3386014: This adds some plumbing for propagating the status and error code of a (Closed)

Created:
10 years, 3 months ago by Greg Spencer (Chromium)
Modified:
9 years, 7 months ago
Reviewers:
agl, Paweł Hajdan Jr.
CC:
chromium-reviews, ben+cc_chromium.org, Erik does not do reviews, brettw-cc_chromium.org, Aaron Boodman, pam+watch_chromium.org, darin-cc_chromium.org, davemoore+watch_chromium.org, Paweł Hajdan Jr., native-client-reviews_googlegroups.com
Visibility:
Public.

Description

This adds some plumbing for propagating the status and error code of a renderer process that went away so that we can tell at the UI level what happened to the tab: did it crash, or was it killed by the OOM killer (or some other reason). This is in preparation for implementing a new UI for when a process is killed by the OOM on ChromeOS which handles it differently from a crash. Most of the changes are modifications of the argument list to include a status and error code for the exited process, but in addition the following was done: - Changed the name of DidProcessCrash to GetTerminationStatus. - Added some new enum values to TerminationStatus enum (and named it) in process_util.h, so it can be used as the status returned by WhatHappenedToProcess. - Improved process_util_unittest to actually test for crashing and terminated processes on all platforms. - Added a new notification for renderers that were killed. - Added error code information to crash notification. - Added status and error code information to renderer IPC message for RenderViewGone. - Added a UMA histogram count for number of renderer kills. BUG=none TEST=ran new unit test. Test passes on try servers. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=f70d0be

Patch Set 1 #

Patch Set 2 : Cleaning up. #

Patch Set 3 : Fixing a naming inconsistency #

Patch Set 4 : more cleanup #

Total comments: 33

Patch Set 5 : Review changes #

Total comments: 2

Patch Set 6 : Review changes, and a bug fix. #

Total comments: 5

Patch Set 7 : Updated comment #

Patch Set 8 : Fixing mac unittest. #

Patch Set 9 : Fixed Mac code to handle both SEGV and BUS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+464 lines, -194 lines) Patch
M base/process_util.h View 1 2 3 4 5 6 3 chunks +19 lines, -7 lines 0 comments Download
M base/process_util_posix.cc View 1 2 3 4 5 6 7 2 chunks +24 lines, -17 lines 0 comments Download
M base/process_util_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +158 lines, -17 lines 0 comments Download
M base/process_util_win.cc View 1 2 3 4 2 chunks +38 lines, -25 lines 0 comments Download
M chrome/browser/browser_child_process_host.h View 1 2 3 4 2 chunks +17 lines, -5 lines 0 comments Download
M chrome/browser/browser_child_process_host.cc View 1 2 3 4 1 chunk +24 lines, -8 lines 0 comments Download
M chrome/browser/child_process_launcher.h View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/child_process_launcher.cc View 1 2 3 4 1 chunk +13 lines, -10 lines 0 comments Download
M chrome/browser/child_process_security_policy_browsertest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_crash_recovery_browsertest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/sandboxed_extension_unpacker.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/sandboxed_extension_unpacker.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/importer/importer.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/importer/importer.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/in_process_webkit/indexed_db_key_utility_client.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/in_process_webkit/indexed_db_key_utility_client.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/nacl_host/nacl_process_host.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/nacl_host/nacl_process_host.cc View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/profile_import_process_host.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profile_import_process_host.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 3 4 5 6 2 chunks +13 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/render_process_host.h View 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host_delegate.h View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host.h View 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view.h View 1 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_gtk.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_gtk.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/test/test_render_view_host.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/test/web_cache_manager_browsertest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/tab_contents/interstitial_page.h View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/interstitial_page.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/web_contents_unittest.cc View 4 5 6 5 chunks +12 lines, -6 lines 0 comments Download
M chrome/browser/task_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/utility_process_host.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/utility_process_host.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/web_resource/web_resource_service.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/zygote_host_linux.h View 1 2 3 4 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/zygote_host_linux.cc View 1 2 3 4 2 chunks +18 lines, -13 lines 0 comments Download
M chrome/browser/zygote_main_linux.cc View 1 2 3 4 2 chunks +17 lines, -12 lines 0 comments Download
M chrome/common/notification_type.h View 1 chunk +12 lines, -4 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M chrome/common/result_codes.h View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Greg Spencer (Chromium)
Adam, if you don't have time to review this right now, let me know and ...
10 years, 3 months ago (2010-09-21 16:54:10 UTC) #1
agl
LGTM The flakyness of the tests needs to be fixed and I think some of ...
10 years, 3 months ago (2010-09-21 17:33:16 UTC) #2
Paweł Hajdan Jr.
Drive-by with test comments. http://codereview.chromium.org/3386014/diff/7001/8003 File base/process_util_unittest.cc (right): http://codereview.chromium.org/3386014/diff/7001/8003#newcode82 base/process_util_unittest.cc:82: PlatformThread::Sleep(kIntervalMs); Yeah, can we wait ...
10 years, 3 months ago (2010-09-22 08:54:28 UTC) #3
Greg Spencer (Chromium)
http://codereview.chromium.org/3386014/diff/7001/8001 File base/process_util.h (right): http://codereview.chromium.org/3386014/diff/7001/8001#newcode91 base/process_util.h:91: PROCESS_END_NORMAL_TERMINATION = 0, // zero exit status On 2010/09/21 ...
10 years, 3 months ago (2010-09-22 19:12:13 UTC) #4
agl
LGTM
10 years, 3 months ago (2010-09-22 19:19:50 UTC) #5
Paweł Hajdan Jr.
NACK. Just to be clear: please do not commit without my explicit "LGTM". Waiting properly ...
10 years, 3 months ago (2010-09-23 10:08:30 UTC) #6
agl
On Thu, Sep 23, 2010 at 6:08 AM, <phajdan.jr@chromium.org> wrote: > We should somehow call ...
10 years, 3 months ago (2010-09-23 13:45:00 UTC) #7
Paweł Hajdan Jr.
After an offline discussion with agl I think the polling loop is fine here, but ...
10 years, 3 months ago (2010-09-23 14:11:38 UTC) #8
Greg Spencer
I'm sorry, I'm gonna need an LGTM that's a leetle bit more explicit than that... ...
10 years, 3 months ago (2010-09-23 15:14:04 UTC) #9
Paweł Hajdan Jr.
There are still some other issues from my earlier comments. On Thu, Sep 23, 2010 ...
10 years, 3 months ago (2010-09-23 15:22:02 UTC) #10
Paweł Hajdan Jr.
There are still some other issues from my earlier comments. On Thu, Sep 23, 2010 ...
10 years, 3 months ago (2010-09-23 15:28:28 UTC) #11
Greg Spencer (Chromium)
OK, I believe I've addressed your remaining comments, Paweł.
10 years, 3 months ago (2010-09-23 16:46:24 UTC) #12
Paweł Hajdan Jr.
http://codereview.chromium.org/3386014/diff/25001/26003 File base/process_util_unittest.cc (right): http://codereview.chromium.org/3386014/diff/25001/26003#newcode61 base/process_util_unittest.cc:61: const int kMaxWaitTimeMs = 5000; We should use chrome/test/test_timeouts. ...
10 years, 3 months ago (2010-09-23 16:52:05 UTC) #13
Greg Spencer (Chromium)
http://codereview.chromium.org/3386014/diff/25001/26003 File base/process_util_unittest.cc (right): http://codereview.chromium.org/3386014/diff/25001/26003#newcode61 base/process_util_unittest.cc:61: const int kMaxWaitTimeMs = 5000; On 2010/09/23 16:52:06, Paweł ...
10 years, 3 months ago (2010-09-23 17:24:11 UTC) #14
Paweł Hajdan Jr.
On Thu, Sep 23, 2010 at 19:24, <gspencer@chromium.org> wrote: > > http://codereview.chromium.org/3386014/diff/25001/26003 > File base/process_util_unittest.cc ...
10 years, 3 months ago (2010-09-23 17:27:36 UTC) #15
Paweł Hajdan Jr.
Actually, I can do the move if you'd like me to do. Can do it ...
10 years, 3 months ago (2010-09-23 17:28:07 UTC) #16
Greg Spencer
That would be great. I have one more issue that's cropped up on Mac to ...
10 years, 3 months ago (2010-09-23 17:51:48 UTC) #17
Greg Spencer (Chromium)
10 years, 3 months ago (2010-09-24 00:39:39 UTC) #18
OK, I've fixed my Mac issue, and I'm planning to check this in on Monday (PST)
if there are no new objections.
(I'm out tomorrow on vacation).

-Greg.


On 2010/09/23 17:51:48, Greg Spencer wrote:
> That would be great.  I have one more issue that's cropped up on Mac
> to solve first, however.
> 
> -Greg.
> 
> On Thu, Sep 23, 2010 at 10:27 AM, Paweł Hajdan, Jr.
> <mailto:phajdan.jr@chromium.org> wrote:
> > Actually, I can do the move if you'd like me to do. Can do it tomorrow CEST.

Powered by Google App Engine
This is Rietveld 408576698