| Index: ui/views/mus/screen_mus.cc
|
| diff --git a/ui/views/mus/screen_mus.cc b/ui/views/mus/screen_mus.cc
|
| index faa31ad3463dc1ac9b46a703fc11236c1faf2e7b..1a66fa864d6bcfea27c0062a17de6d4c488da384 100644
|
| --- a/ui/views/mus/screen_mus.cc
|
| +++ b/ui/views/mus/screen_mus.cc
|
| @@ -98,8 +98,14 @@
|
| // from running on the calling thread. http://crbug.com/594852.
|
| display_manager_observer_binding_.WaitForIncomingMethodCall();
|
|
|
| - // The WaitForIncomingMethodCall() should have supplied the set of Displays.
|
| - DCHECK(displays_.size());
|
| + // The WaitForIncomingMethodCall() should have supplied the set of Displays,
|
| + // unless mus is going down, in which case encountered_error() is true.
|
| + if (displays_.empty()) {
|
| + DCHECK(display_manager_.encountered_error());
|
| + // 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)));
|
| + }
|
| }
|
|
|
| int ScreenMus::FindDisplayIndexById(int64_t id) const {
|
| @@ -207,6 +213,7 @@
|
| // added.
|
| DCHECK(displays_.empty());
|
| displays_ = displays.To<std::vector<gfx::Display>>();
|
| + DCHECK(!displays_.empty());
|
| for (size_t i = 0; i < displays.size(); ++i) {
|
| if (displays[i]->is_primary) {
|
| primary_display_index_ = static_cast<int>(i);
|
|
|