forked from mirrors/gecko-dev
Bug 1613011 - Clear node links when removing it from a RedBlackTree. r=njn
The assert that was added in bug 1610720 assumed the node links were reset when a node is removed from a RedBlackTree, but that wasn't the case. We can either remove the assert, or clear node links. We pick the latter. Differential Revision: https://phabricator.services.mozilla.com/D61515 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
bc5a36afbd
commit
a28cf3044f
1 changed files with 3 additions and 0 deletions
|
|
@ -546,6 +546,9 @@ class RedBlackTree {
|
||||||
}
|
}
|
||||||
// Update root.
|
// Update root.
|
||||||
mRoot = TreeNode(rbp_r_s.addr()).Left().Get();
|
mRoot = TreeNode(rbp_r_s.addr()).Left().Get();
|
||||||
|
aNode.SetLeft(nullptr);
|
||||||
|
aNode.SetRight(nullptr);
|
||||||
|
aNode.SetColor(NodeColor::Black);
|
||||||
}
|
}
|
||||||
|
|
||||||
TreeNode RotateLeft(TreeNode aNode) {
|
TreeNode RotateLeft(TreeNode aNode) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue