Bug 1619865 - Support pdb paths with forward slashes. r=gerald

Differential Revision: https://phabricator.services.mozilla.com/D65286

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2020-03-04 08:02:42 +00:00
Родитель 2d8df288cb
Коммит 1a58a0ff4f
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -211,13 +211,13 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
AppendHex(pdbAge, breakpadId, WITHOUT_PADDING);
pdbPathStr = pdbName;
size_t pos = pdbPathStr.rfind('\\');
size_t pos = pdbPathStr.find_last_of("\\/");
pdbNameStr =
(pos != std::string::npos) ? pdbPathStr.substr(pos + 1) : pdbPathStr;
}
std::string modulePathStr(modulePath);
size_t pos = modulePathStr.rfind('\\');
size_t pos = modulePathStr.find_last_of("\\/");
std::string moduleNameStr = (pos != std::string::npos)
? modulePathStr.substr(pos + 1)
: modulePathStr;

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

@ -144,7 +144,7 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
nsAutoString modulePathStr(modulePath);
nsAutoString moduleNameStr = modulePathStr;
int32_t pos = moduleNameStr.RFindChar('\\');
int32_t pos = moduleNameStr.RFindCharInSet(u"\\/");
if (pos != kNotFound) {
moduleNameStr.Cut(0, pos + 1);
}
@ -210,7 +210,7 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
pdbPathStr = NS_ConvertUTF8toUTF16(pdbName);
pdbNameStr = pdbPathStr;
int32_t pos = pdbNameStr.RFindChar('\\');
int32_t pos = pdbNameStr.RFindCharInSet(u"\\/");
if (pos != kNotFound) {
pdbNameStr.Cut(0, pos + 1);
}