mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1297773 - Fix thread filter to use case insensitive substring matching. r=mstange
MozReview-Commit-ID: 9umKsSQ9a73 --HG-- extra : rebase_source : 4358a4cf8d8b6e613097449e90a1cbb92f668552
This commit is contained in:
parent
c7b987867a
commit
3011e2c2dd
@ -18,6 +18,8 @@
|
||||
#include "GeckoTaskTracer.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace mozilla {
|
||||
class ProfileGatherer;
|
||||
} // namespace mozilla
|
||||
@ -31,8 +33,15 @@ threadSelected(ThreadInfo* aInfo, const ThreadNameFilterList &aThreadNameFilters
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string name = aInfo->Name();
|
||||
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
|
||||
|
||||
for (uint32_t i = 0; i < aThreadNameFilters.length(); ++i) {
|
||||
if (aThreadNameFilters[i] == aInfo->Name()) {
|
||||
std::string filter = aThreadNameFilters[i];
|
||||
std::transform(filter.begin(), filter.end(), filter.begin(), ::tolower);
|
||||
|
||||
// Crude, non UTF-8 compatible, case insensitive substring search
|
||||
if (name.find(filter) != std::string::npos) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user