Assert that entry exists before removing it. Bug 876155, r=ehsan

This commit is contained in:
Simon Montagu 2013-05-29 10:36:59 +03:00
parent 5b8c7799f1
commit 034354edf3

View File

@ -460,12 +460,12 @@ public:
void RemoveEntry(nsINode* aTextNode, Element* aElement)
{
if (mElements.Contains(aElement)) {
mElements.Remove(aElement);
NS_ASSERTION(mElements.Contains(aElement),
"element already removed from map");
aElement->ClearHasDirAutoSet();
aElement->UnsetProperty(nsGkAtoms::dirAutoSetBy);
}
mElements.Remove(aElement);
aElement->ClearHasDirAutoSet();
aElement->UnsetProperty(nsGkAtoms::dirAutoSetBy);
}
private: