summaryrefslogtreecommitdiff
path: root/xpcom/threads/nsThread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/threads/nsThread.cpp')
-rw-r--r--xpcom/threads/nsThread.cpp3
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;
}