Expanding an ElementsTreeElement used to immediately set a
populated flag to true before requesting getChildNodes().
If a ChildNodeCountUpdated event arrives before the children
are set, we may call updateModifiedParentNode() and try to
create visibleChildren when they are null, breaking the tree.
This CL moves the place where 'populated' is set, so that
updateModifiedParentNode() does not update tree children
before they are available.
Bug: 829884
Change-Id: Id68e71fb7a58336d781207b298a53354af3e5cfc
Reviewed-on: https://chromium-review.googlesource.com/1049113
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#557132}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2e5ad0a88b7d04fe1aac8b2fd0c26b2d3475e4c2