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

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

Issue 1928733002: mus/views: Call to WaitForIncomingMethodCall() can fail. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/screen_mus.cc
diff --git a/ui/views/mus/screen_mus.cc b/ui/views/mus/screen_mus.cc
index cec007bfe6b5adf9bc2690578c776462dc9e37fb..d6d110647907717770bce05c4d35680721a6d9b7 100644
--- a/ui/views/mus/screen_mus.cc
+++ b/ui/views/mus/screen_mus.cc
@@ -96,12 +96,13 @@ void ScreenMus::Init(shell::Connector* connector) {
//
// TODO(rockot): Do something better here. This should not have to block tasks
// from running on the calling thread. http://crbug.com/594852.
- display_manager_observer_binding_.WaitForIncomingMethodCall();
+ bool success = display_manager_observer_binding_.WaitForIncomingMethodCall();
// The WaitForIncomingMethodCall() should have supplied the set of Displays,
- // unless mus is going down, in which case encountered_error() is true.
+ // unless mus is going down, in which case encountered_error() is true, or the
+ // call to WaitForIncomingMethodCall() failed.
if (displays_.empty()) {
- DCHECK(display_manager_.encountered_error());
+ DCHECK(display_manager_.encountered_error() || !success);
sky 2016/04/27 21:09:59 Isn't encountered_error set in this case?
sadrul 2016/04/27 21:39:24 Apparently not. (it's easy to hit this DCHECK() wi
// In this case we install a default display and assume the process is
// going to exit shortly so that the real value doesn't matter.
displays_.push_back(gfx::Display(0xFFFFFFFF, gfx::Rect(0, 0, 801, 802)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698