зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1634785 - Do not expose AddSharedLibraryFromModuleInfo that's only used internally r=mstange,profiler-reviewers
This method was used only internally, and having this method declaration causes issues. That's this method was already like this in tools/profiler version of this but it wasn't implemented here. Differential Revision: https://phabricator.services.mozilla.com/D220886
This commit is contained in:
Родитель
f67f994dc2
Коммит
9d03b260f0
|
@ -73,8 +73,9 @@ static bool IsModuleUnsafeToLoad(const std::string& aModuleName) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void SharedLibraryInfo::AddSharedLibraryFromModuleInfo(
|
||||
const wchar_t* aModulePath, mozilla::Maybe<HMODULE> aModule) {
|
||||
void AddSharedLibraryFromModuleInfo(SharedLibraryInfo& sharedLibraryInfo,
|
||||
const wchar_t* aModulePath,
|
||||
mozilla::Maybe<HMODULE> aModule) {
|
||||
mozilla::UniquePtr<char[]> utf8ModulePath(
|
||||
mozilla::glue::WideToUTF8(aModulePath));
|
||||
if (!utf8ModulePath) {
|
||||
|
@ -172,7 +173,7 @@ void SharedLibraryInfo::AddSharedLibraryFromModuleInfo(
|
|||
0, // DLLs are always mapped at offset 0 on Windows
|
||||
breakpadId, codeId, moduleNameStr, modulePathStr,
|
||||
pdbNameStr, pdbPathStr, versionStr, "");
|
||||
AddSharedLibrary(shlib);
|
||||
sharedLibraryInfo.AddSharedLibrary(shlib);
|
||||
}
|
||||
|
||||
SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
|
||||
|
@ -180,8 +181,8 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
|
|||
|
||||
auto addSharedLibraryFromModuleInfo =
|
||||
[&sharedLibraryInfo](const wchar_t* aModulePath, HMODULE aModule) {
|
||||
sharedLibraryInfo.AddSharedLibraryFromModuleInfo(
|
||||
aModulePath, mozilla::Some(aModule));
|
||||
AddSharedLibraryFromModuleInfo(sharedLibraryInfo, aModulePath,
|
||||
mozilla::Some(aModule));
|
||||
};
|
||||
|
||||
mozilla::EnumerateProcessModules(addSharedLibraryFromModuleInfo);
|
||||
|
@ -190,7 +191,7 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
|
|||
|
||||
SharedLibraryInfo SharedLibraryInfo::GetInfoFromPath(const wchar_t* aPath) {
|
||||
SharedLibraryInfo sharedLibraryInfo;
|
||||
sharedLibraryInfo.AddSharedLibraryFromModuleInfo(aPath, mozilla::Nothing());
|
||||
AddSharedLibraryFromModuleInfo(sharedLibraryInfo, aPath, mozilla::Nothing());
|
||||
return sharedLibraryInfo;
|
||||
}
|
||||
|
||||
|
|
|
@ -177,11 +177,6 @@ class SharedLibraryInfo {
|
|||
}
|
||||
|
||||
private:
|
||||
#ifdef XP_WIN
|
||||
void AddSharedLibraryFromModuleInfo(const wchar_t* aModulePath,
|
||||
mozilla::Maybe<HMODULE> aModule);
|
||||
#endif
|
||||
|
||||
std::vector<SharedLibrary> mEntries;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче