Changeset 62170 in vbox for trunk/src/libs/xpcom18a4/xpcom/base
- Timestamp:
- Jul 11, 2016 6:14:11 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/base/nsExceptionService.cpp
r56585 r62170 84 84 #ifdef NS_DEBUG 85 85 inline nsrefcnt ReleaseQuiet() { 86 // shut up NS_ASSERT_OWNINGTHREAD (see expla ination below)86 // shut up NS_ASSERT_OWNINGTHREAD (see explanation below) 87 87 nsAutoOwningThread old = _mOwningThread; 88 88 _mOwningThread = nsAutoOwningThread(); … … 115 115 // holding objects (i.e. it's thread-safe to call them), but 116 116 // NS_CheckThreadSafe() assertions will still happen and yell in the debug 117 // build. Since it is quite annoying, we use a special ReleaseQuiet() me htod117 // build. Since it is quite annoying, we use a special ReleaseQuiet() method 118 118 // in DoDropThread() to shut them up. 119 119 NS_IMPL_THREADSAFE_ISUPPORTS1(nsExceptionManager, nsIExceptionManager) … … 165 165 166 166 PRUintn nsExceptionService::tlsIndex = BAD_TLS_INDEX; 167 PRLock *nsExceptionService::lock = PR_FALSE;167 PRLock *nsExceptionService::lock = nsnull; 168 168 nsExceptionManager *nsExceptionService::firstThread = nsnull; 169 169 … … 201 201 { 202 202 Shutdown(); 203 if (lock) { 204 PRLock *tmp = lock; 205 lock = nsnull; 206 PR_DestroyLock(tmp); 207 } 203 208 /* destructor code */ 204 209 #ifdef NS_DEBUG … … 211 216 { 212 217 if (!lock) { 213 // a typical situation is when IPC worker threads that have instantiated214 // exception managers are stopped after nsExceptionService is shut down,215 // which will result into this warning. disable it.216 #if 0217 218 NS_WARNING("nsExceptionService ignoring thread destruction after shutdown"); 218 #endif219 219 return; 220 220 } … … 225 225 void nsExceptionService::Shutdown() 226 226 { 227 PR_SetThreadPrivate(tlsIndex, nsnull); 227 228 mProviders.Reset(); 228 229 if (lock) { 229 230 DropAllThreads(); 230 PR_DestroyLock(lock); 231 lock = nsnull; 232 } 233 PR_SetThreadPrivate(tlsIndex, nsnull); 231 } 234 232 } 235 233 … … 356 354 nsExceptionManager **emp = &firstThread; 357 355 while (*emp != thread) { 358 NS_ABORT_IF_FALSE(*emp, "Could not find the thread to drop!"); 356 if (!*emp) 357 { 358 NS_WARNING("Could not find the thread to drop!"); 359 return; 360 } 359 361 emp = &(*emp)->mNextThread; 360 362 } 361 363 *emp = thread->mNextThread; 362 364 thread->ReleaseQuiet(); 363 thread = 0;365 thread = nsnull; 364 366 } 365 367
Note:
See TracChangeset
for help on using the changeset viewer.