Chromium Code Reviews| 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. |