|
|
Created:
3 years, 8 months ago by Ben Goodger (Google) Modified:
3 years, 8 months ago Reviewers:
Ken Rockot(use gerrit already) CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionMigrate GpuChildThread to use ConnectionFilter instead of the ChildThread's InterfaceRegistry to expose interfaces on incoming connections.
R=rockot@chromium.org
Review-Url: https://codereview.chromium.org/2819903004
Cr-Commit-Position: refs/heads/master@{#466806}
Committed: https://chromium.googlesource.com/chromium/src/+/d623444f8f4423798526f5f596ab10d892b74308
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : . #Patch Set 4 : . #Patch Set 5 : . #Patch Set 6 : . #Patch Set 7 : . #Patch Set 8 : . #Patch Set 9 : . #
Total comments: 1
Patch Set 10 : . #Patch Set 11 : . #
Total comments: 1
Patch Set 12 : . #Patch Set 13 : . #Patch Set 14 : . #Patch Set 15 : . #Patch Set 16 : . #Patch Set 17 : . #
Total comments: 1
Patch Set 18 : . #Patch Set 19 : . #
Total comments: 2
Patch Set 20 : . #Patch Set 21 : . #Patch Set 22 : . #Patch Set 23 : . #Patch Set 24 : . #Patch Set 25 : . #Patch Set 26 : . #
Dependent Patchsets: Messages
Total messages: 115 (96 generated)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Migrate GpuChildThread to use ConnectionFilter instead of the ChildThread's InterfaceRegistry to expose interfaces on incoming connections. R=rockot@chromium.org ========== to ========== Migrate GpuChildThread to use ConnectionFilter instead of the ChildThread's InterfaceRegistry to expose interfaces on incoming connections. R=rockot@chromium.org ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_cronet on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_cron...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by ben@chromium.org to run a CQ dry run
ok how about now
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
Hmm, this definitely won't work. CreateGpuService can't be invoked until the IPC Channel is set up. The IPC Channel can't be set up until the ServiceManagerConnection is started - the browser binds to the IPC::mojom::ChannelBootstrap interface, which is handled by a ConnectionFilter in the child (https://cs.chromium.org/chromium/src/content/child/child_thread_impl.cc?rcl=1...) https://codereview.chromium.org/2819903004/diff/160001/content/gpu/gpu_child_... File content/gpu/gpu_child_thread.cc (right): https://codereview.chromium.org/2819903004/diff/160001/content/gpu/gpu_child_... content/gpu/gpu_child_thread.cc:78: .InBrowserProcess(params) Need to turn off autostart for this constructor as well
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by ben@chromium.org to run a CQ dry run
OK what about this
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
On 2017/04/19 04:38:49, Ben Goodger (Google) wrote: > OK what about this yeah ok let me refix the red
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
https://codereview.chromium.org/2819903004/diff/200001/chrome/gpu/chrome_cont... File chrome/gpu/chrome_content_gpu_client.h (right): https://codereview.chromium.org/2819903004/diff/200001/chrome/gpu/chrome_cont... chrome/gpu/chrome_content_gpu_client.h:21: void Initialize(base::FieldTrialList::Observer* observer) override; need to update the signature here https://codereview.chromium.org/2819903004/diff/320001/content/gpu/gpu_child_... File content/gpu/gpu_child_thread.cc (right): https://codereview.chromium.org/2819903004/diff/320001/content/gpu/gpu_child_... content/gpu/gpu_child_thread.cc:85: base::WeakPtr<QueueingConnectionFilter> GetWeakPtr() { WeakPtr must be dereferenced and invalidated from the same thread - you're expecting to use a WeakPtr on one thread while invalidating it on another. Instead of doing that, how about binding a callback to Release on the IO thread which uses a WeakPtr, and just having GpuChildThread hold and invoke the callback. Then you don't have to expose a public GetWeakPtr method, and the WeakPtr will always be dereferenced only on the IO thread where it's also invalidated. It's a little ugly: base::Closure GetReleaseCallback() { return base::Bind(base::IgnoreResult(&base::TaskRunner::PostTask), io_task_runner_, FROM_HERE, base::Bind(&QueueingConnectionFilter::Release, weak_factory_.GetWeakPtr())); } but I think safe.
On 2017/04/20 at 15:30:22, Ken Rockot wrote: > https://codereview.chromium.org/2819903004/diff/200001/chrome/gpu/chrome_cont... > File chrome/gpu/chrome_content_gpu_client.h (right): > > https://codereview.chromium.org/2819903004/diff/200001/chrome/gpu/chrome_cont... > chrome/gpu/chrome_content_gpu_client.h:21: void Initialize(base::FieldTrialList::Observer* observer) override; > need to update the signature here oops, old comment plz ignore > > https://codereview.chromium.org/2819903004/diff/320001/content/gpu/gpu_child_... > File content/gpu/gpu_child_thread.cc (right): > > https://codereview.chromium.org/2819903004/diff/320001/content/gpu/gpu_child_... > content/gpu/gpu_child_thread.cc:85: base::WeakPtr<QueueingConnectionFilter> GetWeakPtr() { > WeakPtr must be dereferenced and invalidated from the same thread - you're expecting to use a WeakPtr on one thread while invalidating it on another. Instead of doing that, how about binding a callback to Release on the IO thread which uses a WeakPtr, and just having GpuChildThread hold and invoke the callback. > > Then you don't have to expose a public GetWeakPtr method, and the WeakPtr will always be dereferenced only on the IO thread where it's also invalidated. > > It's a little ugly: > > base::Closure GetReleaseCallback() { > return base::Bind(base::IgnoreResult(&base::TaskRunner::PostTask), > io_task_runner_, FROM_HERE, > base::Bind(&QueueingConnectionFilter::Release, > weak_factory_.GetWeakPtr())); > } > > but I think safe.
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
OK how 'bout now.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
LGTM just nits. Might be worth asking piman@ to take a look too as GPU owner https://codereview.chromium.org/2819903004/diff/360001/content/gpu/gpu_child_... File content/gpu/gpu_child_thread.cc (right): https://codereview.chromium.org/2819903004/diff/360001/content/gpu/gpu_child_... content/gpu/gpu_child_thread.cc:216: release_closure_ = filter->GetReleaseCallback(); nit: Maybe a better name than release_closure_ since in the context of GpuChildThread in general that's pretty ambigious? https://codereview.chromium.org/2819903004/diff/360001/content/gpu/gpu_child_... File content/gpu/gpu_child_thread.h (right): https://codereview.chromium.org/2819903004/diff/360001/content/gpu/gpu_child_... content/gpu/gpu_child_thread.h:75: class QueueingConnectionFilter; Does this really need to be a nested class declaration? I think it can just be defined entirely in an anonymous namespace in the cc?
The CQ bit was checked by ben@chromium.org
The CQ bit was unchecked by ben@chromium.org
The CQ bit was checked by ben@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from rockot@chromium.org Link to the patchset: https://codereview.chromium.org/2819903004/#ps380001 (title: ".")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by ben@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from rockot@chromium.org Link to the patchset: https://codereview.chromium.org/2819903004/#ps400001 (title: ".")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by ben@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from rockot@chromium.org Link to the patchset: https://codereview.chromium.org/2819903004/#ps420001 (title: ".")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...) win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/...)
The CQ bit was checked by ben@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by ben@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by ben@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from rockot@chromium.org Link to the patchset: https://codereview.chromium.org/2819903004/#ps500001 (title: ".")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 500001, "attempt_start_ts": 1493070059894480, "parent_rev": "bab199c9ccd8b873ac9d3c2e68ad79607887263c", "commit_rev": "d623444f8f4423798526f5f596ab10d892b74308"}
Message was sent while issue was closed.
Description was changed from ========== Migrate GpuChildThread to use ConnectionFilter instead of the ChildThread's InterfaceRegistry to expose interfaces on incoming connections. R=rockot@chromium.org ========== to ========== Migrate GpuChildThread to use ConnectionFilter instead of the ChildThread's InterfaceRegistry to expose interfaces on incoming connections. R=rockot@chromium.org Review-Url: https://codereview.chromium.org/2819903004 Cr-Commit-Position: refs/heads/master@{#466806} Committed: https://chromium.googlesource.com/chromium/src/+/d623444f8f4423798526f5f596ab... ==========
Message was sent while issue was closed.
Committed patchset #26 (id:500001) as https://chromium.googlesource.com/chromium/src/+/d623444f8f4423798526f5f596ab... |