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

Unified Diff: ui/views/mus/surface_binding.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 | « no previous file | ui/views/mus/surface_context_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/surface_binding.cc
diff --git a/ui/views/mus/surface_binding.cc b/ui/views/mus/surface_binding.cc
index 4161811c44992bfa72440ed0a1279b1b02903f3f..9aca4af0d6a7e6488099f917aadc35deebbe6b66 100644
--- a/ui/views/mus/surface_binding.cc
+++ b/ui/views/mus/surface_binding.cc
@@ -98,6 +98,8 @@ std::unique_ptr<cc::OutputSurface>
SurfaceBinding::PerConnectionState::CreateOutputSurface(
mus::Window* window,
mus::mojom::SurfaceType surface_type) {
+ if (gpu_.encountered_error())
+ return nullptr;
// TODO(sky): figure out lifetime here. Do I need to worry about the return
// value outliving this?
mus::mojom::CommandBufferPtr cb;
@@ -127,6 +129,7 @@ SurfaceBinding::PerConnectionState::~PerConnectionState() {
void SurfaceBinding::PerConnectionState::Init() {
connector_->ConnectToInterface("mojo:mus", &gpu_);
+ gpu_.set_connection_error_handler([]{});
sadrul 2016/05/18 20:00:19 rockot@: This seems to be necessary for the change
sky 2016/05/18 20:10:32 This seems like a bug in the bindings code.
Ken Rockot(use gerrit already) 2016/05/18 20:11:08 Because we lazily set up the internal proxy in Int
sadrul 2016/05/19 20:14:17 OK. Sounds like this is not entirely unexpected, t
sky 2016/05/19 20:59:42 Yes, go for it.
}
// SurfaceBinding --------------------------------------------------------------
« no previous file with comments | « no previous file | ui/views/mus/surface_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698