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

Issue 857213003: Refactor sudden termination (Closed)

Created:
5 years, 11 months ago by clamy
Modified:
5 years, 10 months ago
Reviewers:
Charlie Reis, nasko
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, carlosk
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor sudden termination This CL is based on the blink patch https://chromiumcodereview.appspot.com/861773003/ and refactors the sudden termination API so that the presence of BeforeUnload and Unload handlers preventing it is accounted on a per-frame basis instead of a per-process basis. BUG=365039 Committed: https://crrev.com/df1975e5b02f1d53b35d7fceaa14c081a6097a03 Cr-Commit-Position: refs/heads/master@{#314848}

Patch Set 1 #

Patch Set 2 : #

Total comments: 35

Patch Set 3 : Addressed Charlie's comments #

Total comments: 24

Patch Set 4 : Addressed Charlie's comments #

Total comments: 9

Patch Set 5 : Rebase #

Patch Set 6 : Addressed Charlie's comments #

Total comments: 10

Patch Set 7 : Rebase #

Patch Set 8 : Addressed Charlie's comments #

Total comments: 11

Patch Set 9 : Rebase #

Patch Set 10 : Addressed Charlie's comments #

Total comments: 4

Patch Set 11 : Addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -49 lines) Patch
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +25 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +20 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -7 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 2 chunks +0 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 4 chunks +17 lines, -7 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 8 chunks +37 lines, -11 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 2 chunks +47 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +17 lines, -0 lines 0 comments Download
M content/test/test_render_frame_host.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M content/test/test_render_frame_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
clamy
@nasko, creis: PTAL. This is the chromium side version of the sudden termination refactor. I ...
5 years, 11 months ago (2015-01-20 16:54:15 UTC) #2
Charlie Reis
Hmm, I think we can simplify this in some important ways, although it might require ...
5 years, 11 months ago (2015-01-23 06:01:33 UTC) #3
clamy
Thanks! I modifed the logic in blink in https://chromiumcodereview.appspot.com/874283003/, and that part is much clearer ...
5 years, 11 months ago (2015-01-26 16:38:40 UTC) #4
Charlie Reis
Great! Now that I'm back from the summit I had some more time to look ...
5 years, 10 months ago (2015-01-29 23:20:42 UTC) #5
clamy
Thanks! I think the main remaining thing to consider is whether we want to remove ...
5 years, 10 months ago (2015-02-02 16:16:28 UTC) #7
Charlie Reis
Thanks. I think we should stick with the existing RendererBlinkPlatformImpl behavior, as explained below. I've ...
5 years, 10 months ago (2015-02-02 20:14:50 UTC) #8
clamy
Thanks! https://chromiumcodereview.appspot.com/857213003/diff/40001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://chromiumcodereview.appspot.com/857213003/diff/40001/content/browser/renderer_host/render_process_host_impl.cc#newcode1429 content/browser/renderer_host/render_process_host_impl.cc:1429: if (!SuddenTerminationAllowed()) On 2015/02/02 20:14:50, Charlie Reis wrote: ...
5 years, 10 months ago (2015-02-03 12:54:03 UTC) #9
Charlie Reis
Thanks! LGTM if you make the changes below. https://codereview.chromium.org/857213003/diff/120001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/857213003/diff/120001/content/browser/renderer_host/render_process_host_impl.h#newcode418 content/browser/renderer_host/render_process_host_impl.h:418: // ...
5 years, 10 months ago (2015-02-03 19:33:16 UTC) #10
clamy
Thanks! I could not use a raw pointer to SiteInstance because base::Bind has a compile ...
5 years, 10 months ago (2015-02-04 13:16:19 UTC) #12
Charlie Reis
I just noticed a bug in WebContents's EnableSuddenTermination, so let's fix that before landing. (A ...
5 years, 10 months ago (2015-02-04 21:34:58 UTC) #13
clamy
Thanks! https://codereview.chromium.org/857213003/diff/160001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/857213003/diff/160001/content/browser/renderer_host/render_process_host_impl.h#newcode418 content/browser/renderer_host/render_process_host_impl.h:418: // level. This is independent from the status ...
5 years, 10 months ago (2015-02-05 16:23:13 UTC) #14
Charlie Reis
Thanks! LGTM with nit. https://codereview.chromium.org/857213003/diff/160001/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://codereview.chromium.org/857213003/diff/160001/content/browser/renderer_host/render_view_host_impl.cc#newcode571 content/browser/renderer_host/render_view_host_impl.cc:571: FrameTree* frame_tree = static_cast<RenderFrameHostImpl*>(GetMainFrame()) On ...
5 years, 10 months ago (2015-02-05 17:12:17 UTC) #15
nasko
IPC LGTM https://codereview.chromium.org/857213003/diff/200001/content/common/frame_messages.h File content/common/frame_messages.h (right): https://codereview.chromium.org/857213003/diff/200001/content/common/frame_messages.h#newcode860 content/common/frame_messages.h:860: // for a frame. |present| is true ...
5 years, 10 months ago (2015-02-05 17:38:02 UTC) #16
clamy
Thanks! https://chromiumcodereview.appspot.com/857213003/diff/200001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://chromiumcodereview.appspot.com/857213003/diff/200001/content/browser/renderer_host/render_process_host_impl.h#newcode422 content/browser/renderer_host/render_process_host_impl.h:422: // registerd but another RenderFrame in the same ...
5 years, 10 months ago (2015-02-05 17:48:46 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/857213003/220001
5 years, 10 months ago (2015-02-05 17:49:13 UTC) #20
commit-bot: I haz the power
Committed patchset #11 (id:220001)
5 years, 10 months ago (2015-02-05 19:12:54 UTC) #21
commit-bot: I haz the power
5 years, 10 months ago (2015-02-05 19:15:01 UTC) #22
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/df1975e5b02f1d53b35d7fceaa14c081a6097a03
Cr-Commit-Position: refs/heads/master@{#314848}

Powered by Google App Engine
This is Rietveld 408576698