DescriptionSync: Handle empty (implicit) ParentId in GetPredecessorId and GetSuccessorId
GetSuccessorId and GetPredecessorId access all children of the
current node's parent in order to get to the next/previous node.
With implicit parent ID these functions can't get to the parent.
The reasons we didn't run into this problem before are
a) The server feature that will stop setting parent ID isn't
enabled yet so there wasn't a chance to expose this yet.
b) There wasn't enough test coverage.
The fix is to use the ParentChildIndex to resolve the implicit
(unset) parent ID. Added a new method called GetSiblings at
the Directory level that does just that. Also added some
unit test coverage.
BUG=438313
Committed: https://crrev.com/12cf7b569a3dc4cbf0f5ee88377bae8e47fc6653
Cr-Commit-Position: refs/heads/master@{#320922}
Patch Set 1 #Patch Set 2 : Added extra unit test. #
Messages
Total messages: 9 (3 generated)
|