Commit Graph

12 Commits (c92eb7e59198d37698c70b5e3be50503f5174cf3)

Author SHA1 Message Date
Nat Goodspeed c92eb7e591 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2016-08-30 11:36:06 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Nat Goodspeed 8fee1565eb MAINT-5232: Use LLError::Log::demangle() to log LLSingleton classes. 2015-06-26 15:28:57 -04:00
Nat Goodspeed 687efd84ea MAINT-5232: Loosen LLSingleton circularity constraints slightly.
LLSingleton explicitly supports circular dependencies: initialization
performed during an LLSingleton subclass's initSingleton() method may
recursively call that same subclass's getInstance() method. On the other hand,
circularity from a subclass constructor cannot be permitted, else
getInstance() would have to return a partially-constructed object.
Our dependency tracking circularity check initially forbade both. Loosen it to
permit references from within initSingleton().
2015-06-26 13:03:59 -04:00
Nat Goodspeed 0ea1b2a164 MAINT-5232: Try to avoid circularity between LLError and LLSingleton.
Part of LLError's logging infrastructure is implemented with an LLSingleton.
Therefore, attempts to log from within LLSingleton machinery could potentially
go south if LLError's LLSingleton is not yet initialized.
Introduce LLError::is_available() in llerrorcontrol.h and llerror.cpp.
Make LLSingletonBase::logwarns() and logerrs() consult LLError::is_available()
before attempting to use LL_WARNS or LL_ERRS, respectively.
Moreover, make all LLSingleton internal logging use logwarns() and logerrs()
instead of directly engaging LL_ERRS or LL_WARNS.
2015-06-25 16:04:01 -04:00
Nat Goodspeed d792baf9f7 MAINT-5232: Introduce inter-LLSingleton dependency tracking.
Introduce LLSingleton::cleanupSingleton() canonical method as the place to put
any subclass cleanup logic that might take nontrivial realtime or throw an
exception. Neither is appropriate in a destructor.
Track all extant LLSingleton subclass instances on a master list, which
permits adding LLSingletonBase::cleanupAll() and deleteAll() methods.
Also notice when any LLSingleton subclass constructor (or initSingleton()
method) calls instance() or getInstance() for another LLSingleton, and capture
that other LLSingleton instance as a dependency of the first. This permits
cleanupAll() and deleteAll() to perform a dependency sort on the master list,
thus cleaning up (or deleting) leaf LLSingletons AFTER the LLSingletons that
depend on them.
Make C++ runtime's final static destructor call LLSingletonBase::deleteAll()
instead of deleting individual LLSingleton instances in arbitrary order.
Eliminate "llerror.h" from llsingleton.h, a longstanding TODO.
2015-06-24 21:14:55 -04:00
simon ee2fce8790 Merge downstream code and viewer-beta 2013-05-09 14:10:45 -07:00
simon 87ba85eaab diff -r 59c7bed66dfd indra/llcommon/lleventapi.h 2013-04-24 09:35:38 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
brad kittenbrink c9ee582c12 Add on-demand allocation of LLSingletonRegistry::sSingletonMap so we don't rely on static initialization order.
reviewed by nat.
2009-08-06 15:53:09 -07:00
brad kittenbrink 860a828639 Attemt at fixing "doubleton" problems across shared lib boundaries. Singletons now keep their SingletonInstaceData in a big global map in the llcommon module. 2009-08-05 14:58:30 -07:00