Bug 1661798 - Have the LinkedList destructor emit the buggy template specialization. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D88663
This commit is contained in:
Kartikaya Gupta 2020-08-28 20:07:26 +00:00
parent 172cef5128
commit 49c359630a

View File

@ -434,10 +434,15 @@ class LinkedList {
}
~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");
# ifdef DEBUG
if (!isEmpty()) {
MOZ_CRASH_UNSAFE_PRINTF(
"%s has a buggy user: "
"it should have removed all this list's elements before "
"the list's destruction",
__PRETTY_FUNCTION__);
}
# endif
}
/*