Bug 1151168 - Don't flush profiled threads that are pending deletion on JS shutdown and don't delete expired markers when resetting the profile buffer. (r=djvj)

This commit is contained in:
Shu-yu Guo 2015-04-06 18:38:30 -07:00
Родитель b71736a068
Коммит d004b16340
2 изменённых файлов: 2 добавлений и 2 удалений

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

@ -153,7 +153,6 @@ void ProfileBuffer::deleteExpiredStoredMarkers() {
void ProfileBuffer::reset() {
mGeneration += 2;
mReadPos = mWritePos = 0;
deleteExpiredStoredMarkers();
}
#define DYNAMIC_MAX_STRING 512

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

@ -378,7 +378,8 @@ void TableTicker::FlushOnJSShutdown(JSRuntime* aRuntime)
for (size_t i = 0; i < sRegisteredThreads->size(); i++) {
// Thread not being profiled, skip it.
if (!sRegisteredThreads->at(i)->Profile()) {
if (!sRegisteredThreads->at(i)->Profile() ||
sRegisteredThreads->at(i)->IsPendingDelete()) {
continue;
}