diff options
author | Moonchild <moonchild@palemoon.org> | 2021-12-09 01:45:06 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-07 23:56:24 +0200 |
commit | b76d12c2bd9a823bfd536763493e25eb56adb5b5 (patch) | |
tree | 57977bbc6fa900ef29fad4e2a113c2ce8d887d77 | |
parent | 57dffbd698fb738695513536e79c9c614bf5c4c0 (diff) | |
download | uxp-b76d12c2bd9a823bfd536763493e25eb56adb5b5.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; } |