Commit d8183532 authored by oshima's avatar oshima Committed by Commit bot

Add/update checks to diagnose the NPE issue

BUG=426292

Review URL: https://codereview.chromium.org/803693002

Cr-Commit-Position: refs/heads/master@{#308208}
parent 408c7414
...@@ -630,10 +630,12 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) { ...@@ -630,10 +630,12 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
primary_tree_host_for_replace_ = host_to_delete; primary_tree_host_for_replace_ = host_to_delete;
return; return;
} }
DCHECK_EQ(1U, window_tree_hosts_.size());
primary_display_id = ScreenUtil::GetSecondaryDisplay().id(); primary_display_id = ScreenUtil::GetSecondaryDisplay().id();
AshWindowTreeHost* primary_host = host_to_delete; CHECK_NE(gfx::Display::kInvalidDisplayID, primary_display_id);
CHECK_EQ(1U, window_tree_hosts_.count(primary_display_id));
AshWindowTreeHost* primary_host = host_to_delete;
// Delete the other host instead. // Delete the other host instead.
host_to_delete = window_tree_hosts_[primary_display_id]; host_to_delete = window_tree_hosts_[primary_display_id];
GetRootWindowSettings(GetWindow(host_to_delete))->display_id = display.id(); GetRootWindowSettings(GetWindow(host_to_delete))->display_id = display.id();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment