Add an assertion message to the assert-is-empty in LinkedList::~LinkedList, to indicate to users who hit it that it's the fault of the caller, not the fault of MFBT code. No bug, rs=froydnj

This commit is contained in:
Jeff Walden 2016-02-16 13:06:20 -08:00
parent 906bc8c43a
commit d9ee752669

View File

@ -325,7 +325,12 @@ public:
: sentinel(mozilla::Move(aOther.sentinel))
{ }
~LinkedList() { MOZ_ASSERT(isEmpty()); }
~LinkedList() {
MOZ_ASSERT(isEmpty(),
"failing this assertion means this LinkedList's creator is "
"buggy: it should have removed all this list's elements before "
"the list's destruction");
}
/*
* Add aElem to the front of the list.