Changeset 101917 in vbox
- Timestamp:
- Nov 7, 2023 9:23:15 AM (15 months ago)
- Location:
- trunk/src/libs/xpcom18a4/xpcom/ds
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/ds/nsObserverList.cpp
r1 r101917 49 49 { 50 50 MOZ_COUNT_CTOR(nsObserverList); 51 mLock = PR_NewLock(); 51 int vrc = RTSemFastMutexCreate(&m_hLock); 52 AssertRC(vrc); RT_NOREF(vrc); 52 53 } 53 54 … … 55 56 { 56 57 MOZ_COUNT_DTOR(nsObserverList); 57 PR_DestroyLock(mLock); 58 int vrc = RTSemFastMutexDestroy(m_hLock); 59 AssertRC(vrc); RT_NOREF(vrc); 58 60 } 59 61 … … 66 68 NS_ENSURE_ARG(anObserver); 67 69 68 nsAutoLock lock(m Lock);70 nsAutoLock lock(m_hLock); 69 71 70 72 if (!mObserverList) { … … 106 108 NS_ENSURE_ARG(anObserver); 107 109 108 nsAutoLock lock(m Lock);110 nsAutoLock lock(m_hLock); 109 111 110 112 if (!mObserverList) … … 135 137 nsObserverList::GetObserverList(nsISimpleEnumerator** anEnumerator) 136 138 { 137 nsAutoLock lock(m Lock);139 nsAutoLock lock(m_hLock); 138 140 139 141 ObserverListEnumerator * enumerator= new ObserverListEnumerator(mObserverList); -
trunk/src/libs/xpcom18a4/xpcom/ds/nsObserverList.h
r1 r101917 64 64 { 65 65 public: 66 nsObserverList();67 ~nsObserverList();66 nsObserverList(); 67 ~nsObserverList(); 68 68 69 nsresult AddObserver(nsIObserver* anObserver, PRBool ownsWeak);70 nsresult RemoveObserver(nsIObserver* anObserver);71 nsresult GetObserverList(nsISimpleEnumerator** anEnumerator);72 69 nsresult AddObserver(nsIObserver* anObserver, PRBool ownsWeak); 70 nsresult RemoveObserver(nsIObserver* anObserver); 71 nsresult GetObserverList(nsISimpleEnumerator** anEnumerator); 72 73 73 protected: 74 PRLock* mLock;75 nsCOMPtr<nsISupportsArray> mObserverList;74 RTSEMFASTMUTEX m_hLock; 75 nsCOMPtr<nsISupportsArray> mObserverList; 76 76 }; 77 77
Note:
See TracChangeset
for help on using the changeset viewer.