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:
Mike Hommey 2020-02-04 02:05:19 +00:00
parent bc5a36afbd
commit a28cf3044f

View file

@ -546,6 +546,9 @@ class RedBlackTree {
}
// Update root.
mRoot = TreeNode(rbp_r_s.addr()).Left().Get();
aNode.SetLeft(nullptr);
aNode.SetRight(nullptr);
aNode.SetColor(NodeColor::Black);
}
TreeNode RotateLeft(TreeNode aNode) {