From 29d41d67a1a5a55dfb01eb9bc7d161368c61470f Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Tue, 12 Feb 2019 19:22:02 +0000 Subject: [PATCH] Bug 1527176 - Check each child has current parent before adding it. r=geckoview-reviewers,snorp,esawin Differential Revision: https://phabricator.services.mozilla.com/D19454 --HG-- extra : moz-landing-system : lando --- .../main/java/org/mozilla/geckoview/SessionAccessibility.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java index fb65f24cf858..52e61d4c53c7 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java @@ -370,7 +370,8 @@ public class SessionAccessibility { 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); }