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

Unified Diff: ash/display/display_layout.cc

Issue 1849683003: Do not register invalid layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | ash/display/display_layout_store.cc » ('j') | ash/display/display_layout_store.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_layout.cc
diff --git a/ash/display/display_layout.cc b/ash/display/display_layout.cc
index f5aa8f4066ea303ad63c124b57fce10b825ffd85..a3bd093b57ed2d5bcc4fc77b35b22e999734de6e 100644
--- a/ash/display/display_layout.cc
+++ b/ash/display/display_layout.cc
@@ -228,7 +228,8 @@ void DisplayLayout::RegisterJSONConverter(
bool DisplayLayout::Validate(const DisplayIdList& list,
const DisplayLayout& layout) {
// The primary display should be in the list.
- DCHECK(IsIdInList(layout.primary_id, list));
+ if (!IsIdInList(layout.primary_id, list))
+ return false;
// Unified mode, or mirror mode switched from unified mode,
// may not have the placement yet.
« no previous file with comments | « no previous file | ash/display/display_layout_store.cc » ('j') | ash/display/display_layout_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698