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

Unified Diff: ui/android/view_android.cc

Issue 2861413002: Refined DCHECK preventing multiple event forwarders in VA tree path (Closed)
Patch Set: fix tests Created 3 years, 7 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 | ui/android/view_android_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/view_android.cc
diff --git a/ui/android/view_android.cc b/ui/android/view_android.cc
index 15e51a0042ca48b6eb5c29d0bbbc6cafdb9541a3..855c0ce34d4b08639768b4f04f3bf19804177d29 100644
--- a/ui/android/view_android.cc
+++ b/ui/android/view_android.cc
@@ -115,7 +115,8 @@ void ViewAndroid::AddChild(ViewAndroid* child) {
DCHECK(child);
DCHECK(std::find(children_.begin(), children_.end(), child) ==
children_.end());
- DCHECK(!SubtreeHasEventForwarder(child) || !ViewTreeHasEventForwarder(this))
+ DCHECK(GetWindowAndroid() == this || !SubtreeHasEventForwarder(child) ||
+ !ViewTreeHasEventForwarder(this))
boliu 2017/05/08 16:54:55 the previous check is too strict. check should be
Jinsuk Kim 2017/05/10 01:42:10 Updated the DCHECK to do what's actually intended.
<< "Only one event handler is allowed.";
// The new child goes to the top, which is the end of the list.
« no previous file with comments | « no previous file | ui/android/view_android_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698