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

Unified Diff: services/ui/ws/window_tree.cc

Issue 2165873003: Adds some DCHECKs to help isolate flake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index 56cbea50cd4c94df473bf8443045b5194a1560bf..b83d0998bd8ca8db34aec8e25b488f2b2617bb43 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -115,6 +115,12 @@ void WindowTree::Init(std::unique_ptr<WindowTreeBinding> binding,
}
void WindowTree::ConfigureWindowManager() {
+ // ConfigureWindowManager() should be called early on, before anything
+ // else. |waiting_for_top_level_window_info_| must be null as if
+ // |waiting_for_top_level_window_info_| is non-null it means we're about to
+ // create an associated interface, which doesn't work with pause/resume.
+ // TODO(sky): DCHECK temporary until 626869 is sorted out.
+ DCHECK(!waiting_for_top_level_window_info_);
DCHECK(!window_manager_internal_);
window_manager_internal_ = binding_->GetWindowManager();
window_manager_internal_->OnConnect(id_);
@@ -1011,6 +1017,8 @@ void WindowTree::NewTopLevelWindow(
Id transport_window_id,
mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) {
DCHECK(!waiting_for_top_level_window_info_);
+ // TODO(sky): rather than DCHECK, have this kill connection.
+ DCHECK(!window_manager_internal_); // Not valid for the windowmanager.
const ClientWindowId client_window_id(transport_window_id);
// TODO(sky): need a way for client to provide context to figure out display.
Display* display = display_manager()->displays().empty()
« 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