Bug 1009603 - Tracelogger: Part 5: Handle stack mismatch gracefully (for release builds), r=bbouvier

This commit is contained in:
Hannes Verschore 2014-06-09 13:42:34 +02:00
parent 50481d7d67
commit 10709ebddb

View File

@ -328,7 +328,7 @@ TraceLogger::~TraceLogger()
// We temporary enable logging for this. Stop doesn't need any extra data,
// so is safe to do, even when we encountered OOM.
enabled = true;
while (stack.size() > 0)
while (stack.currentId() > 0)
stopEvent();
enabled = false;
}
@ -707,6 +707,7 @@ TraceLogger::stopEvent()
return;
}
}
JS_ASSERT(stack.currentId() > 0);
stack.pop();
}