Bug 1402251 - Assert ranges our not added to multiple common ancestor lists. r=smaug

This commit is contained in:
Catalin Badea 2017-10-09 14:13:18 +01:00
parent 74f1c6ece5
commit d059041927

View File

@ -439,6 +439,8 @@ nsRange::RegisterCommonAncestor(nsINode* aNode)
if (!ranges) {
ranges = MakeUnique<LinkedList<nsRange>>();
}
MOZ_DIAGNOSTIC_ASSERT(!isInList());
ranges->insertBack(this);
aNode->SetCommonAncestorForRangeInSelection();
}