Profiler: Use NonnullOwnPtr for libraries

This commit is contained in:
Gunnar Beutner 2021-04-26 16:45:57 +02:00 committed by Andreas Kling
parent eb798d5538
commit ba9a285d56
Notes: sideshowbarker 2024-07-18 19:04:25 +09:00
2 changed files with 1 additions and 3 deletions

View File

@ -109,8 +109,6 @@ String LibraryMetadata::Library::symbolicate(FlatPtr ptr, u32* offset) const
const LibraryMetadata::Library* LibraryMetadata::library_containing(FlatPtr ptr) const
{
for (auto& it : m_libraries) {
if (!it.value)
continue;
auto& library = *it.value;
if (ptr >= library.base && ptr < (library.base + library.size))
return &library;

View File

@ -35,7 +35,7 @@ public:
const Library* library_containing(FlatPtr) const;
private:
mutable HashMap<String, OwnPtr<Library>> m_libraries;
mutable HashMap<String, NonnullOwnPtr<Library>> m_libraries;
};
struct Thread {