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

Issue 2111353002: Move content's shell connections to the IO thread (Closed)

Created:
4 years, 5 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 5 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, piman+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move content's service manager connections to the IO thread Moves all service manager connections in the content layer (connections owned by instances of MojoShellConnection and MojoChildConnection) to the IO thread in all process types. Note that instances of MojoShellConnection and MojoChildConnection may still be created and used on any thread. Additionally exposes a way for InterfaceRegistry and InterfaceProvider to forward to/from other instances so we can still have a corresponding instance of each on whatever thread owns the Mojo[Shell/Child]Connection object. This simplifies interface registration and acquisition on process hosts and ChildThreadImpls, and makes it possible for a future CL to introduce IO-thread service registration to avoid thread hops when binding incoming interface requests. BUG=623398, 612500, 619202 Committed: https://crrev.com/439768f0aaaea83ffb7ce6c3ba4438804582c383 Committed: https://crrev.com/0771b1d71a3295691f9ffaefdf50652bd58e01c4 Committed: https://crrev.com/cef3827ff96c4fa12fcfbe95942f5d1b0a512a08 Cr-Original-Original-Commit-Position: refs/heads/master@{#404228} Cr-Original-Commit-Position: refs/heads/master@{#404556} Cr-Commit-Position: refs/heads/master@{#405885}

Patch Set 1 #

Patch Set 2 : . #

Total comments: 3

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : remove SetInterface*ForConnection #

Patch Set 7 : rebase #

Patch Set 8 : . #

Total comments: 4

Patch Set 9 : AcceptConnection -> OnConnect #

Patch Set 10 : . #

Patch Set 11 : fix chrome shutdown on external service manager connection loss #

Patch Set 12 : rebase #

Total comments: 1

Patch Set 13 : fix stale ShellConnectionRef usage #

Patch Set 14 : revert some gpu changes #

Total comments: 1

Patch Set 15 : rebase #

Patch Set 16 : . #

Patch Set 17 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1137 lines, -541 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/chrome_interface_factory.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -46 lines 0 comments Download
M chrome/browser/chromeos/chrome_interface_factory.cc View 1 2 3 4 5 6 7 8 9 3 chunks +96 lines, -37 lines 0 comments Download
M chrome/test/base/mash_browser_tests_main.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/browser_context.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -6 lines 0 comments Download
M content/browser/mojo/mojo_child_connection.h View 1 2 3 4 5 6 3 chunks +26 lines, -5 lines 0 comments Download
M content/browser/mojo/mojo_child_connection.cc View 1 2 3 4 5 6 2 chunks +148 lines, -27 lines 0 comments Download
M content/browser/mojo/mojo_shell_context.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +14 lines, -22 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 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +12 lines, -16 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mus.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/utility_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -5 lines 0 comments Download
M content/child/background_sync/background_sync_provider.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/child/child_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +13 lines, -9 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +36 lines, -18 lines 0 comments Download
M content/common/mojo/mojo_shell_connection_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +37 lines, -32 lines 0 comments Download
M content/common/mojo/mojo_shell_connection_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +350 lines, -102 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/gpu/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/gpu/gpu_child_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +1 line, -8 lines 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +16 lines, -34 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -3 lines 0 comments Download
M content/public/child/child_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
A content/public/common/connection_filter.h View 1 2 3 4 5 6 7 8 1 chunk +40 lines, -0 lines 0 comments Download
M content/public/common/mojo_shell_connection.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +43 lines, -12 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -4 lines 0 comments Download
M content/renderer/mus/render_widget_window_tree_client_factory.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M content/renderer/mus/render_widget_window_tree_client_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +26 lines, -13 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +20 lines, -15 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M services/navigation/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -2 lines 0 comments Download
M services/navigation/content_client/content_browser_client.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M services/navigation/navigation.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +9 lines, -6 lines 0 comments Download
M services/navigation/navigation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +29 lines, -10 lines 0 comments Download
M services/navigation/view_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -2 lines 0 comments Download
M services/navigation/view_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +7 lines, -5 lines 0 comments Download
M services/shell/public/cpp/connection.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M services/shell/public/cpp/connector.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M services/shell/public/cpp/interface_provider.h View 1 2 3 3 chunks +15 lines, -0 lines 0 comments Download
M services/shell/public/cpp/interface_registry.h View 1 2 4 chunks +19 lines, -0 lines 0 comments Download
M services/shell/public/cpp/lib/connector_impl.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M services/shell/public/cpp/lib/connector_impl.cc View 1 2 3 4 5 6 4 chunks +42 lines, -20 lines 0 comments Download
M services/shell/public/cpp/lib/interface_provider.cc View 1 2 3 2 chunks +21 lines, -1 line 0 comments Download
M services/shell/public/cpp/lib/interface_registry.cc View 1 2 2 chunks +17 lines, -6 lines 0 comments Download
M services/shell/public/cpp/lib/service_context.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +25 lines, -44 lines 0 comments Download
M services/shell/public/cpp/service_context.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -15 lines 0 comments Download

Messages

Total messages: 87 (46 generated)
Ken Rockot(use gerrit already)
It's not quite done, I still have to update callers of AddEmbeddedShellClient to use AddConnectionFilter ...
4 years, 5 months ago (2016-07-02 17:50:25 UTC) #3
Ben Goodger (Google)
Sweet! Have to run some errands now, will take a look this afternoon during nap ...
4 years, 5 months ago (2016-07-02 18:05:48 UTC) #4
Ben Goodger (Google)
https://codereview.chromium.org/2111353002/diff/20001/content/common/mojo/mojo_shell_connection_impl.cc File content/common/mojo/mojo_shell_connection_impl.cc (right): https://codereview.chromium.org/2111353002/diff/20001/content/common/mojo/mojo_shell_connection_impl.cc#newcode284 content/common/mojo/mojo_shell_connection_impl.cc:284: const ConnectionFilter& filter) { did you mean to leave ...
4 years, 5 months ago (2016-07-03 03:29:27 UTC) #5
Ken Rockot(use gerrit already)
Moar changes. One outstanding problem is that this exposed a racy deadlock. We're apparently using ...
4 years, 5 months ago (2016-07-04 18:22:58 UTC) #9
Ken Rockot(use gerrit already)
On 2016/07/04 at 18:22:58, Ken Rockot wrote: > Moar changes. > > One outstanding problem ...
4 years, 5 months ago (2016-07-04 18:26:47 UTC) #10
Ken Rockot(use gerrit already)
OK, deadlock should be fixed.
4 years, 5 months ago (2016-07-04 22:03:52 UTC) #11
Ben Goodger (Google)
OK I still feel a bit queasy about all this but since I'm on vacation, ...
4 years, 5 months ago (2016-07-05 21:39:45 UTC) #14
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2111353002/diff/200001/chrome/browser/chromeos/chrome_interface_factory.cc File chrome/browser/chromeos/chrome_interface_factory.cc (right): https://codereview.chromium.org/2111353002/diff/200001/chrome/browser/chromeos/chrome_interface_factory.cc#newcode155 chrome/browser/chromeos/chrome_interface_factory.cc:155: FactoryImpl::AddFactory<keyboard::mojom::Keyboard>(connection, On 2016/07/05 at 21:39:45, Ben Goodger (Google) wrote: ...
4 years, 5 months ago (2016-07-06 17:09:57 UTC) #15
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/2111353002/220001
4 years, 5 months ago (2016-07-07 17:16:37 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/164284)
4 years, 5 months ago (2016-07-07 18:10:44 UTC) #20
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/2111353002/220001
4 years, 5 months ago (2016-07-07 19:59:38 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:220001)
4 years, 5 months ago (2016-07-07 20:19:31 UTC) #23
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-07 20:19:35 UTC) #24
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/439768f0aaaea83ffb7ce6c3ba4438804582c383 Cr-Commit-Position: refs/heads/master@{#404228}
4 years, 5 months ago (2016-07-07 20:21:01 UTC) #26
Ken Rockot(use gerrit already)
A revert of this CL (patchset #9 id:220001) has been created in https://codereview.chromium.org/2132793002/ by rockot@chromium.org. ...
4 years, 5 months ago (2016-07-07 20:47:56 UTC) #27
Ken Rockot(use gerrit already)
Relanding with compile fix
4 years, 5 months ago (2016-07-07 21:06:44 UTC) #28
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/2111353002/240001
4 years, 5 months ago (2016-07-07 21:07:54 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_gyp_rel on master.tryserver.chromium.mac (JOB_TIMED_OUT, no build URL)
4 years, 5 months ago (2016-07-07 23:09:47 UTC) #33
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/2111353002/240001
4 years, 5 months ago (2016-07-07 23:45:21 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/240646)
4 years, 5 months ago (2016-07-08 03:48:00 UTC) #37
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/2111353002/260001
4 years, 5 months ago (2016-07-08 21:46:09 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/93436)
4 years, 5 months ago (2016-07-08 21:59:11 UTC) #42
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/2111353002/280001
4 years, 5 months ago (2016-07-08 22:07:54 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/241209) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 5 months ago (2016-07-08 22:25:59 UTC) #48
piman
https://codereview.chromium.org/2111353002/diff/280001/content/gpu/gpu_child_thread.cc File content/gpu/gpu_child_thread.cc (right): https://codereview.chromium.org/2111353002/diff/280001/content/gpu/gpu_child_thread.cc#newcode270 content/gpu/gpu_child_thread.cc:270: GetInterfaceRegistry()->PauseBinding(); drive-by, IIUC, this CL makes GpuConnectionFilter handle things ...
4 years, 5 months ago (2016-07-08 22:42:19 UTC) #50
Ken Rockot(use gerrit already)
On 2016/07/08 at 22:42:19, piman wrote: > https://codereview.chromium.org/2111353002/diff/280001/content/gpu/gpu_child_thread.cc > File content/gpu/gpu_child_thread.cc (right): > > https://codereview.chromium.org/2111353002/diff/280001/content/gpu/gpu_child_thread.cc#newcode270 ...
4 years, 5 months ago (2016-07-08 23:08:45 UTC) #51
piman
On Fri, Jul 8, 2016 at 4:08 PM, <rockot@chromium.org> wrote: > On 2016/07/08 at 22:42:19, ...
4 years, 5 months ago (2016-07-08 23:28:31 UTC) #52
Ken Rockot(use gerrit already)
On 2016/07/08 at 23:28:31, piman wrote: > On Fri, Jul 8, 2016 at 4:08 PM, ...
4 years, 5 months ago (2016-07-08 23:59:08 UTC) #53
piman
LGTM, with one comment. https://codereview.chromium.org/2111353002/diff/320001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): https://codereview.chromium.org/2111353002/diff/320001/content/browser/gpu/gpu_process_host.cc#newcode570 content/browser/gpu/gpu_process_host.cc:570: BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); FYI, this is already ...
4 years, 5 months ago (2016-07-09 00:33:17 UTC) #54
piman
On Fri, Jul 8, 2016 at 4:59 PM, <rockot@chromium.org> wrote: > On 2016/07/08 at 23:28:31, ...
4 years, 5 months ago (2016-07-09 00:33:22 UTC) #55
Ken Rockot(use gerrit already)
On 2016/07/09 at 00:33:17, piman wrote: > LGTM, with one comment. > > https://codereview.chromium.org/2111353002/diff/320001/content/browser/gpu/gpu_process_host.cc > ...
4 years, 5 months ago (2016-07-09 00:48:31 UTC) #56
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/2111353002/320001
4 years, 5 months ago (2016-07-09 01:01:30 UTC) #59
commit-bot: I haz the power
Committed patchset #14 (id:320001)
4 years, 5 months ago (2016-07-09 01:17:13 UTC) #60
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-09 01:17:17 UTC) #61
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/0771b1d71a3295691f9ffaefdf50652bd58e01c4 Cr-Commit-Position: refs/heads/master@{#404556}
4 years, 5 months ago (2016-07-09 01:18:40 UTC) #63
Ken Rockot(use gerrit already)
A revert of this CL (patchset #14 id:320001) has been created in https://codereview.chromium.org/2138263002/ by rockot@chromium.org. ...
4 years, 5 months ago (2016-07-11 22:58:47 UTC) #64
Ken Rockot(use gerrit already)
It's unlikely that this CL could have actually caused the browser hangs seen on some ...
4 years, 5 months ago (2016-07-15 22:41:12 UTC) #80
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/2111353002/380001
4 years, 5 months ago (2016-07-15 22:42:00 UTC) #83
commit-bot: I haz the power
Committed patchset #17 (id:380001)
4 years, 5 months ago (2016-07-15 22:48:02 UTC) #84
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-15 22:48:11 UTC) #85
commit-bot: I haz the power
4 years, 5 months ago (2016-07-15 22:49:33 UTC) #87
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/cef3827ff96c4fa12fcfbe95942f5d1b0a512a08
Cr-Commit-Position: refs/heads/master@{#405885}

Powered by Google App Engine
This is Rietveld 408576698