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

Issue 1369603003: Remove 2-stage RenderWidget initialization (Closed)

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

Description

Remove 2-stage RenderWidget initialization We don't need to wait for HWND (etc.) creation before creating the context any more. Therefore, we don't need to delay StartCompositor. After that, CompleteInit doesn't do anything beyond sending ViewHostMsg_RenderViewReady. The ViewHostMsg_RenderViewReady handler only does a few things that can be done immediately after sending the message that would have caused CompleteInit (ViewMsg_New / ViewMsg_CreatingNew_ACK) - IPC ordering ensuring renderer-side order of operations. Once CompleteInit is empty, ViewMsg_CreatingNew_ACK is not useful any more either. The only thing that needs to be handled carefully is calling RenderViewHostDelegate::RenderViewReady, because downstream code expects it to be only called once a couple of conditions are true (which were enforced by the renderer round-trip). This saves an IPC round-trip in all RenderWidget creations. BUG=535339 Committed: https://crrev.com/c4af307b97653099dda5e5fab24880065dbe0239 Cr-Commit-Position: refs/heads/master@{#351951}

Patch Set 1 : more test fixes #

Patch Set 2 : rebase #

Total comments: 23

Patch Set 3 : Add DCHECK and docs #

Patch Set 4 : rebase #

Patch Set 5 : Fix GetPeerPID race #

Patch Set 6 : fix racy test #

Total comments: 2

Patch Set 7 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -89 lines) Patch
M chrome/browser/apps/guest_view/web_view_browsertest.cc View 1 2 3 4 5 6 3 chunks +21 lines, -18 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 chunks +30 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 4 chunks +7 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 7 chunks +27 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 4 chunks +1 line, -8 lines 0 comments Download
M content/common/swapped_out_messages.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 3 chunks +2 lines, -12 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 2 chunks +15 lines, -3 lines 0 comments Download
M content/public/browser/render_process_host_observer.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/render_widget.h View 1 3 chunks +1 line, -7 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 6 chunks +1 line, -26 lines 0 comments Download

Messages

Total messages: 33 (13 generated)
piman
5 years, 2 months ago (2015-09-29 00:16:57 UTC) #5
dcheng
The RenderWidget changes seem fine to me, but I think nick@ is probably a better ...
5 years, 2 months ago (2015-09-29 03:56:17 UTC) #7
ncarter (slow)
In the words of CongratBot: This is pure great. https://codereview.chromium.org/1369603003/diff/80001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1369603003/diff/80001/content/browser/renderer_host/render_process_host_impl.cc#newcode1486 content/browser/renderer_host/render_process_host_impl.cc:1486: ...
5 years, 2 months ago (2015-09-29 18:28:41 UTC) #8
piman
PS3 has updates, PS4 is just a rebase. https://codereview.chromium.org/1369603003/diff/80001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1369603003/diff/80001/content/browser/renderer_host/render_process_host_impl.cc#newcode1486 content/browser/renderer_host/render_process_host_impl.cc:1486: bool ...
5 years, 2 months ago (2015-09-29 23:54:28 UTC) #10
piman
Oh, hold on one sec, GetPeerPID() isn't safe on the channel unless it is known ...
5 years, 2 months ago (2015-09-30 00:33:18 UTC) #11
piman
On 2015/09/30 00:33:18, piman (slow to review) wrote: > Oh, hold on one sec, GetPeerPID() ...
5 years, 2 months ago (2015-09-30 00:40:36 UTC) #12
piman
On 2015/09/30 00:40:36, piman (slow to review) wrote: > On 2015/09/30 00:33:18, piman (slow to ...
5 years, 2 months ago (2015-09-30 04:35:22 UTC) #13
ncarter (slow)
lgtm https://codereview.chromium.org/1369603003/diff/80001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1369603003/diff/80001/content/browser/renderer_host/render_process_host_impl.cc#newcode2423 content/browser/renderer_host/render_process_host_impl.cc:2423: RenderProcessReady(this)); On 2015/09/29 23:54:27, piman (slow to review) ...
5 years, 2 months ago (2015-09-30 20:30:33 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1369603003/170001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1369603003/170001
5 years, 2 months ago (2015-09-30 21:02:01 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/105360)
5 years, 2 months ago (2015-09-30 21:22:08 UTC) #18
piman
dcheng: ping for swapped_out_messages.cc and view_messages.g fsamuel: please take a look at chrome/browser/apps/guest_view/web_view_browsertest.cc (the test ...
5 years, 2 months ago (2015-09-30 22:18:40 UTC) #20
Fady Samuel
https://chromiumcodereview.appspot.com/1369603003/diff/170001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://chromiumcodereview.appspot.com/1369603003/diff/170001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode2944 chrome/browser/apps/guest_view/web_view_browsertest.cc:2944: bool found = false; Could you please move this ...
5 years, 2 months ago (2015-09-30 22:21:04 UTC) #21
piman
https://chromiumcodereview.appspot.com/1369603003/diff/170001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://chromiumcodereview.appspot.com/1369603003/diff/170001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode2944 chrome/browser/apps/guest_view/web_view_browsertest.cc:2944: bool found = false; On 2015/09/30 22:21:04, Fady Samuel ...
5 years, 2 months ago (2015-09-30 22:36:17 UTC) #22
Fady Samuel
guest_view lgtm
5 years, 2 months ago (2015-09-30 22:39:06 UTC) #23
piman
dcheng: ping. This just removes a couple of IPCs, should be non-controversial.
5 years, 2 months ago (2015-10-02 02:28:51 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1369603003/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1369603003/190001
5 years, 2 months ago (2015-10-02 02:29:18 UTC) #26
dcheng
lgtm
5 years, 2 months ago (2015-10-02 02:54:03 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1369603003/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1369603003/190001
5 years, 2 months ago (2015-10-02 03:25:39 UTC) #31
commit-bot: I haz the power
Committed patchset #7 (id:190001)
5 years, 2 months ago (2015-10-02 03:46:07 UTC) #32
commit-bot: I haz the power
5 years, 2 months ago (2015-10-02 03:47:07 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/c4af307b97653099dda5e5fab24880065dbe0239
Cr-Commit-Position: refs/heads/master@{#351951}

Powered by Google App Engine
This is Rietveld 408576698