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

Issue 2250473005: content: Fix Context creation logic in ContextProviderFactoryImpl. (Closed)

Created:
4 years, 4 months ago by Khushal
Modified:
4 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

content: Fix Context creation logic in ContextProviderFactoryImpl. 1) The BrowserGpuChannelHostFactory runs any pending callbacks during shutdown. This can become re-entrant if the caller queued more requests on getting a null GpuChannel. So destroy the ContextProviderFactoryImpl before destroying the BrowserGpuChannelHostFactory. 2) Specify the reason for the context creation failure in the callback from ContextProviderFactoryImpl so the callers can respond accordingly and retry if necessary. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/becb5a6cf904faee4024a13e9760b71245e77b31 Cr-Commit-Position: refs/heads/master@{#415877}

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix deletion #

Patch Set 3 : run the callback once, fix comments. #

Total comments: 6

Patch Set 4 : Addressed comments #

Total comments: 3

Patch Set 5 : consecutive failures #

Total comments: 2

Patch Set 6 : Rebase + correct factory lifetimes. #

Patch Set 7 : rebase + test updates #

Patch Set 8 : missing include #

Patch Set 9 : missed one test harness #

Patch Set 10 : use mock factory #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -94 lines) Patch
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 3 chunks +9 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest_unittest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +18 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 2 chunks +44 lines, -19 lines 0 comments Download
M content/browser/renderer_host/context_provider_factory_impl_android.h View 1 2 3 4 5 5 chunks +19 lines, -12 lines 0 comments Download
M content/browser/renderer_host/context_provider_factory_impl_android.cc View 1 2 3 4 5 5 chunks +79 lines, -50 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/test_renderer_host.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/test/test_renderer_host.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -0 lines 0 comments Download
A content/test/mock_gpu_channel_establish_factory.h View 1 2 3 4 5 6 7 8 9 1 chunk +26 lines, -0 lines 0 comments Download
A content/test/mock_gpu_channel_establish_factory.cc View 1 2 3 4 5 6 7 8 9 1 chunk +28 lines, -0 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 5 6 7 8 9 3 chunks +20 lines, -7 lines 0 comments Download
M ui/android/context_provider_factory.h View 1 2 3 4 5 2 chunks +19 lines, -3 lines 0 comments Download

Messages

Total messages: 62 (33 generated)
Khushal
4 years, 4 months ago (2016-08-16 20:20:32 UTC) #2
piman
https://codereview.chromium.org/2250473005/diff/1/content/browser/gpu/browser_gpu_channel_host_factory.cc File content/browser/gpu/browser_gpu_channel_host_factory.cc (right): https://codereview.chromium.org/2250473005/diff/1/content/browser/gpu/browser_gpu_channel_host_factory.cc#newcode220 content/browser/gpu/browser_gpu_channel_host_factory.cc:220: delete instance_; This would delete nullptr, i.e. leak - ...
4 years, 4 months ago (2016-08-16 22:04:52 UTC) #7
Khushal
https://codereview.chromium.org/2250473005/diff/1/content/browser/gpu/browser_gpu_channel_host_factory.cc File content/browser/gpu/browser_gpu_channel_host_factory.cc (right): https://codereview.chromium.org/2250473005/diff/1/content/browser/gpu/browser_gpu_channel_host_factory.cc#newcode220 content/browser/gpu/browser_gpu_channel_host_factory.cc:220: delete instance_; On 2016/08/16 22:04:52, piman wrote: > This ...
4 years, 4 months ago (2016-08-16 22:11:58 UTC) #8
piman
LGTM for content/browser/gpu. I will let Daniel look at the Android-specific side, because he understands ...
4 years, 4 months ago (2016-08-16 22:18:59 UTC) #11
Khushal
Thanks piman! +dtrainor for stamping ui/
4 years, 4 months ago (2016-08-16 22:45:59 UTC) #13
no sievers
thanks! https://codereview.chromium.org/2250473005/diff/40001/content/browser/renderer_host/context_provider_factory_impl_android.cc File content/browser/renderer_host/context_provider_factory_impl_android.cc (right): https://codereview.chromium.org/2250473005/diff/40001/content/browser/renderer_host/context_provider_factory_impl_android.cc#newcode52 content/browser/renderer_host/context_provider_factory_impl_android.cc:52: return factory->GetGpuChannel(); nit: This is maybe a bit ...
4 years, 4 months ago (2016-08-17 18:30:10 UTC) #14
Khushal
https://codereview.chromium.org/2250473005/diff/40001/content/browser/renderer_host/context_provider_factory_impl_android.cc File content/browser/renderer_host/context_provider_factory_impl_android.cc (right): https://codereview.chromium.org/2250473005/diff/40001/content/browser/renderer_host/context_provider_factory_impl_android.cc#newcode52 content/browser/renderer_host/context_provider_factory_impl_android.cc:52: return factory->GetGpuChannel(); On 2016/08/17 18:30:10, sievers wrote: > nit: ...
4 years, 4 months ago (2016-08-17 21:24:56 UTC) #15
no sievers
lgtm https://codereview.chromium.org/2250473005/diff/60001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/2250473005/diff/60001/content/browser/renderer_host/compositor_impl_android.cc#newcode667 content/browser/renderer_host/compositor_impl_android.cc:667: // Retry only if we are visible. On ...
4 years, 4 months ago (2016-08-17 21:34:39 UTC) #16
Khushal
Thanks Daniel. Pingy to dtrainor@ https://codereview.chromium.org/2250473005/diff/60001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/2250473005/diff/60001/content/browser/renderer_host/compositor_impl_android.cc#newcode667 content/browser/renderer_host/compositor_impl_android.cc:667: // Retry only if ...
4 years, 4 months ago (2016-08-17 21:55:55 UTC) #17
David Trainor- moved to gerrit
lgtm! https://codereview.chromium.org/2250473005/diff/80001/ui/android/context_provider_factory.h File ui/android/context_provider_factory.h (right): https://codereview.chromium.org/2250473005/diff/80001/ui/android/context_provider_factory.h#newcode37 ui/android/context_provider_factory.h:37: // Used when the browser is shutting down. ...
4 years, 4 months ago (2016-08-18 17:49:43 UTC) #22
Khushal
https://codereview.chromium.org/2250473005/diff/80001/ui/android/context_provider_factory.h File ui/android/context_provider_factory.h (right): https://codereview.chromium.org/2250473005/diff/80001/ui/android/context_provider_factory.h#newcode37 ui/android/context_provider_factory.h:37: // Used when the browser is shutting down. No ...
4 years, 4 months ago (2016-08-18 18:29:13 UTC) #23
Khushal
I just changed the setup so the GpuChannelEstablishFactory always outlives the ContextProviderFactoryImpl, and when you ...
4 years, 3 months ago (2016-08-24 23:43:54 UTC) #24
Khushal
On 2016/08/24 23:43:54, Khushal wrote: > I just changed the setup so the GpuChannelEstablishFactory always ...
4 years, 3 months ago (2016-08-29 21:12:00 UTC) #25
no sievers
On 2016/08/29 21:12:00, Khushal wrote: > On 2016/08/24 23:43:54, Khushal wrote: > > I just ...
4 years, 3 months ago (2016-08-30 20:51:00 UTC) #26
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/2250473005/120001
4 years, 3 months ago (2016-08-31 00:06:46 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/121183)
4 years, 3 months ago (2016-08-31 00:30:18 UTC) #32
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/2250473005/140001
4 years, 3 months ago (2016-08-31 17:30:55 UTC) #35
commit-bot: I haz the power
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_android_rel_ng/builds/133934)
4 years, 3 months ago (2016-08-31 19:13:57 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/2250473005/160001
4 years, 3 months ago (2016-08-31 21:31:28 UTC) #40
commit-bot: I haz the power
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_android_rel_ng/builds/134089) linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 3 months ago (2016-08-31 21:39:33 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/2250473005/160001
4 years, 3 months ago (2016-08-31 21:41:29 UTC) #44
commit-bot: I haz the power
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_android_rel_ng/builds/134098)
4 years, 3 months ago (2016-08-31 22:25:21 UTC) #46
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/2250473005/160001
4 years, 3 months ago (2016-08-31 22:33:22 UTC) #48
commit-bot: I haz the power
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_android_rel_ng/builds/134152)
4 years, 3 months ago (2016-08-31 23:17:57 UTC) #50
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/2250473005/180001
4 years, 3 months ago (2016-09-01 02:56:12 UTC) #53
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 3 months ago (2016-09-01 04:09:50 UTC) #54
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/becb5a6cf904faee4024a13e9760b71245e77b31 Cr-Commit-Position: refs/heads/master@{#415877}
4 years, 3 months ago (2016-09-01 04:35:07 UTC) #56
Michael van Ouwerkerk
A revert of this CL (patchset #10 id:180001) has been created in https://codereview.chromium.org/2299183002/ by mvanouwerkerk@chromium.org. ...
4 years, 3 months ago (2016-09-01 15:19:16 UTC) #59
weiliangc
4 years, 3 months ago (2016-09-01 17:53:03 UTC) #61
Message was sent while issue was closed.
Also responsible for failure on GPU.FYI Android bots gpu_process_launch_tests
GpuProcess.no_gpu_process.

Powered by Google App Engine
This is Rietveld 408576698