Bug 831133 - Record only the basename. r=vladan.

This commit is contained in:
Rafael Ávila de Espíndola 2013-01-16 21:02:32 -05:00
parent 3c03d12c55
commit 0cdb0a43d3

View File

@ -2245,8 +2245,19 @@ GetStackAndModules(const std::vector<uintptr_t>& aPCs)
#ifdef MOZ_ENABLE_PROFILER_SPS
for (unsigned i = 0, n = rawModules.GetSize(); i != n; ++i) {
const SharedLibrary &info = rawModules.GetEntry(i);
const std::string &name = info.GetName();
std::string basename = name;
#ifdef XP_MACOSX
// FIXME: We want to use just the basename as the libname, but the
// current profiler addon needs the full path name, so we compute the
// basename in here.
size_t pos = name.rfind('/');
if (pos != std::string::npos) {
basename = name.substr(pos + 1);
}
#endif
ProcessedStack::Module module = {
info.GetName(),
basename,
info.GetBreakpadId()
};
Ret.AddModule(module);