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 4376e1a345
commit 02c1f966d9

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.