Index: ui/views/view.h |
diff --git a/ui/views/view.h b/ui/views/view.h |
index a6811afca8a5c084b0d81d5ab375e483cc46c006..8a296a99b813c315b1c960d07b97d0da636b6d1b 100644 |
--- a/ui/views/view.h |
+++ b/ui/views/view.h |
@@ -1466,6 +1466,12 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
// This view's children. |
Views children_; |
+#if DCHECK_IS_ON() |
+ // True while iterating over |children_|. Used to detect and DCHECK when |
+ // |children_| is mutated during iteration. |
+ mutable bool iterating_; |
+#endif |
+ |
// Size and disposition ------------------------------------------------------ |
// This View's bounds in the parent coordinate system. |