Bug 1527176 - Check each child has current parent before adding it. r=geckoview-reviewers,snorp,esawin
authorEitan Isaacson <eitan@monotonous.org>
Tue, 12 Feb 2019 19:22:02 +0000
changeset 458780 2d0505c52681
parent 458779 c27aa490f40b
child 458781 64c8b805491a
push id35548
push useropoprus@mozilla.com
push dateWed, 13 Feb 2019 09:48:26 +0000
treeherdermozilla-central@93e37c529818 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, snorp, esawin
bugs1527176
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527176 - Check each child has current parent before adding it. r=geckoview-reviewers,snorp,esawin Differential Revision: https://phabricator.services.mozilla.com/D19454
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
@@ -365,17 +365,18 @@ public class SessionAccessibility {
                 final Rect parentBounds = new Rect(b[0] - (int)origin[0], b[1] - (int)origin[1], b[2], b[3]);
                 node.setBoundsInParent(parentBounds);
             }
 
             // Children
             int[] children = nodeInfo.getIntArray("children");
             if (children != null) {
                 for (int childId : children) {
-                    if (!fromCache || getMostRecentBundle(childId) != null) {
+                    final GeckoBundle childBundle = getMostRecentBundle(childId);
+                    if (!fromCache || (childBundle != null && childBundle.getInt("parentId") == id)) {
                         // If this node is from cache, only populate with children that are cached as well.
                         node.addChild(mView, childId);
                     }
                 }
             }
 
             // SDK 18 and above
             if (Build.VERSION.SDK_INT >= 18) {