Skip to content

Commit 081c9c1

Browse files
committed
Invert order in which we acquire mutexes in operator=
1 parent 9ebfdc8 commit 081c9c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/source/Target/PathMappingList.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ PathMappingList::PathMappingList(const PathMappingList &rhs)
4848

4949
const PathMappingList &PathMappingList::operator=(const PathMappingList &rhs) {
5050
if (this != &rhs) {
51-
std::scoped_lock<std::mutex, std::mutex> pairs_locks(m_pairs_mutex,
52-
rhs.m_pairs_mutex);
5351
std::scoped_lock<std::mutex, std::mutex> callback_locks(
5452
m_callback_mutex, rhs.m_callback_mutex);
53+
std::scoped_lock<std::mutex, std::mutex> pairs_locks(m_pairs_mutex,
54+
rhs.m_pairs_mutex);
5555
m_pairs = rhs.m_pairs;
5656
m_callback = nullptr;
5757
m_callback_baton = nullptr;

0 commit comments

Comments
 (0)