diff options
author | Moonchild <moonchild@palemoon.org> | 2021-12-09 01:45:06 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-03 01:04:29 +0200 |
commit | fd59fd55a242f913fa828bc4e3477d47546d6bb4 (patch) | |
tree | 48feacbfb1f67983a5d3ef1762d2a44f794ceac8 | |
parent | 2c2b3ab1ba1a9da16f0b0a6145afc0b3f744b0f9 (diff) | |
download | uxp-fd59fd55a242f913fa828bc4e3477d47546d6bb4.tar.gz |
[XPCOM] Use swap in nsThread::SetObserver.
-rw-r--r-- | xpcom/threads/nsThread.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xpcom/threads/nsThread.cpp b/xpcom/threads/nsThread.cpp index 5e5b89d18f..ed67fa6594 100644 --- a/xpcom/threads/nsThread.cpp +++ b/xpcom/threads/nsThread.cpp @@ -1217,7 +1217,8 @@ nsThread::SetObserver(nsIThreadObserver* aObs) } MutexAutoLock lock(mLock); - mObserver = aObs; + nsCOMPtr<nsIThreadObserver> observer = aObs; + mObserver.swap(observer); return NS_OK; } |