Bug 1270938 - Add stack traces for blocking resource base warnings. r=froydnj

This commit is contained in:
Eric Rahm 2016-05-23 14:59:30 -07:00
Родитель 7b7d04ca34
Коммит 3e3b6c7f4d
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -350,9 +350,9 @@ BlockingResourceBase::Release()
ResourceChainRemove();
} else {
// not an error, but makes code hard to reason about.
NS_WARNING("Resource acquired at calling context\n");
NS_WARNING(" [stack trace unavailable]\n");
NS_WARNING("\nis being released in non-LIFO order; why?");
NS_WARNING("Resource acquired is being released in non-LIFO order; why?\n");
nsCString tmp;
Print(tmp);
// remove this resource from wherever it lives in the chain
// we walk backwards in order of acquisition:
@ -416,9 +416,7 @@ ReentrantMonitor::Enter()
br = ResourceChainPrev(br)) {
if (br == this) {
NS_WARNING(
"Re-entering ReentrantMonitor after acquiring other resources.\n"
"At calling context\n"
" [stack trace unavailable]\n");
"Re-entering ReentrantMonitor after acquiring other resources.");
// show the caller why this is potentially bad
CheckAcquire();