//leakcanary-repo/shark/DominatorTree/updateDominated
updateDominated¶
[jvm]\ fun updateDominated(objectId: Long, parentObjectId: Long): Boolean
Records that objectId can be reached through parentObjectId, updating the dominator for objectId to be either parentObjectId if objectId has no known dominator and otherwise to the Lowest Common Dominator between parentObjectId and the previously determined dominator for objectId.
parentObjectId should already have been added via updateDominatedAsRoot. Failing to do that will throw IllegalStateException on future calls.
This implementation is optimized with the assumption that the graph is visited as a breadth first search, so when objectId already has a known dominator then its dominator path is shorter than the dominator path of parentObjectId.
Return¶
true if objectId already had a known dominator, false otherwise.