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

Unified Diff: ui/views/mus/surface_context_factory.cc

Issue 1995613003: views/mus: Fix some flaky crashes during test teardown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views-mus-more-focus-fix
Patch Set: . Created 4 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/views/mus/surface_binding.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/surface_context_factory.cc
diff --git a/ui/views/mus/surface_context_factory.cc b/ui/views/mus/surface_context_factory.cc
index 1d643095e830cad370ab2c51a11f911facd50f96..316d14e3c2713b68d618710d82a929f721bd31bf 100644
--- a/ui/views/mus/surface_context_factory.cc
+++ b/ui/views/mus/surface_context_factory.cc
@@ -39,7 +39,10 @@ SurfaceContextFactory::~SurfaceContextFactory() {}
void SurfaceContextFactory::CreateOutputSurface(
base::WeakPtr<ui::Compositor> compositor) {
// NOTIMPLEMENTED();
- compositor->SetOutputSurface(surface_binding_.CreateOutputSurface());
+ std::unique_ptr<cc::OutputSurface> surface =
+ surface_binding_.CreateOutputSurface();
+ if (surface)
+ compositor->SetOutputSurface(std::move(surface));
}
std::unique_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector(
« no previous file with comments | « ui/views/mus/surface_binding.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698