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

Unified Diff: ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java

Issue 2346183002: Ensure container is attached to Window (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
index aca3a8fe2db019187d19ff5c6ef0123c1ca2c0ae..82d09ea85aba6095b160d67ec5238c93b1586bb1 100644
--- a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
+++ b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
@@ -31,7 +31,7 @@ public abstract class ViewAndroidDelegate {
@CalledByNative
public View acquireView() {
ViewGroup containerView = getContainerView();
- if (containerView == null) return null;
+ if (containerView == null || containerView.getParent() == null) return null;
View anchorView = new View(containerView.getContext());
containerView.addView(anchorView);
return anchorView;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698