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

Unified Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 2903353002: Make ozone/drm/mojo more immune to startup races (Closed)
Patch Set: make CursorProxyMojo a GpuThreadObserver Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/mus_thread_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/ozone_platform_gbm.cc
diff --git a/ui/ozone/platform/drm/ozone_platform_gbm.cc b/ui/ozone/platform/drm/ozone_platform_gbm.cc
index df0cb0a2d8b04471226174852b8a0d78d91cb5bb..b8a623a41c4a565c1f5a0d814d8181c018ea96c0 100644
--- a/ui/ozone/platform/drm/ozone_platform_gbm.cc
+++ b/ui/ozone/platform/drm/ozone_platform_gbm.cc
@@ -124,8 +124,6 @@ class OzonePlatformGbm : public OzonePlatform {
const gfx::Rect& bounds) override {
GpuThreadAdapter* adapter = gpu_platform_support_host_.get();
if (using_mojo_ || single_process_) {
- DCHECK(drm_thread_proxy_)
- << "drm_thread_proxy_ should exist (and be running) here.";
adapter = mus_thread_proxy_.get();
}
@@ -179,7 +177,9 @@ class OzonePlatformGbm : public OzonePlatform {
DCHECK(args.connector);
mus_thread_proxy_.reset(new MusThreadProxy());
adapter = mus_thread_proxy_.get();
- cursor_->SetDrmCursorProxy(new CursorProxyMojo(args.connector));
+ auto cursor_proxy = new CursorProxyMojo(args.connector);
+ mus_thread_proxy_->AddGpuThreadObserver(cursor_proxy);
kylechar 2017/05/30 19:46:22 I think this will result in a use after free? |cu
dnicoara 2017/05/30 20:35:17 On the old path the cursor is special cased and no
rjkroege 2017/05/31 00:39:14 Done.
rjkroege 2017/05/31 00:39:14 I don't understand. The creation of the CursorProx
dnicoara 2017/05/31 15:01:14 Cursor creation is fine. I'm referring to the orde
+ cursor_->SetDrmCursorProxy(cursor_proxy);
kylechar 2017/05/30 19:46:22 Can this be changed to take a unqiue_ptr?
rjkroege 2017/05/31 00:39:14 Done.
} else if (single_process_) {
mus_thread_proxy_.reset(new MusThreadProxy());
adapter = mus_thread_proxy_.get();
« no previous file with comments | « ui/ozone/platform/drm/mus_thread_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698