summaryrefslogtreecommitdiff
path: root/indra
AgeCommit message (Collapse)Author
2015-06-26MAINT-5232: Use LLError::Log::demangle() to log LLSingleton classes.Nat Goodspeed
2015-06-26MAINT-5232: merge LLError::Log::demangle() to tipNat Goodspeed
2015-06-26MAINT-5232: Publish class name demangler as LLError::Log::demangle().Nat Goodspeed
We've had this functionality buried in llerror.cpp for years. Make it available for callers outside llerror.cpp too.
2015-06-26MAINT-5232: Loosen LLSingleton circularity constraints slightly.Nat Goodspeed
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-25MAINT-5232: Make LLHTTPClientAdapter not be an LLSingleton.Nat Goodspeed
llhttpclientadapter_test.cpp starts its every test by explicitly instantiating a local LLHTTPClientAdapter object. This is an abuse of LLSingleton, and if it had been properly defined (private constructor), it should never have compiled. Looked at the other way, though, every known reference to LLHTTPClientAdapter instantiates a local object. Why did someone think it should be an LLSingleton in the first place? Remove LLSingleton<> as a base class; remove llsingleton.h. This makes llhttpclientadapter_test.cpp work just fine. One might also question what value this class adds. It seems to do very little -- but more significantly, the ONLY references in the source tree are its declaration, definition and test. Nobody actually uses it anywhere.
2015-06-25MAINT-5232: Correct forward declaration of LLSingleton_manage_master.Nat Goodspeed
The forward declaration said it was a 'friend class', whereas the actual definition is a struct. MSVC dislikes that.
2015-06-25MAINT-5232: Try to avoid circularity between LLError and LLSingleton.Nat Goodspeed
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-24MAINT-5232: Introduce inter-LLSingleton dependency tracking.Nat Goodspeed
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-24MAINT-5232: Finish 7724e79aaf62: remove LLGlobalEconomy::initSingleton()Nat Goodspeed
2015-05-29MAINT-5232: Make LLPounceable noncopyable.Nat Goodspeed
Changing the queue-of-callables implementation to boost::signals2::signal, which is noncopyable, means that LLPounceable itself should be noncopyable.
2015-05-29MAINT-5232: Per Vir review, use Boost.Signals2 for LLPounceable.Nat Goodspeed
Vir points out that "queue of callables" is pretty much exactly what a signal does. Add unit tests to verify chronological order, also queue reset when fired.
2015-05-28MAINT-5232: Stop documenting deprecated alternative LLSingleton usage.Nat Goodspeed
2015-05-28MAINT-5232: Normalize LLGlobalEconomy's use of LLSingleton.Nat Goodspeed
LLSingleton currently presents two different usage styles: deriving MyClass from LLSingleton<MyClass>, or just using a typedef. Turns out LLGlobalEconomy is the ONLY class using the typedef style -- and the apologetic comment talks about a potential maintenance that hasn't actually happened. Derive LLGlobalEconomy from LLSingleton<LLGlobalEconomy>, like everyone else.
2015-05-28MAINT-5232: Provide better commentation for llinitdestroyclass.h.Nat Goodspeed
2015-05-27MAINT-5232: Extract LLInitClass, LLDestroyClass from llui/llui.hNat Goodspeed
to a new llcommon/llinitdestroyclass.h. This mechanism is so general -- but has so many related moving parts -- that (a) it deserves to be in a header file all its own, instead of conflated with llui.h, and (b) it should be in llcommon where anyone can use it. It has no dependencies whatsoever on llui or anything viewer-specific. In this very changeset we changed one #include "llui.h" whose comment admits that it was only dragged in for LLDestroyClass.
2015-05-27MAINT-5232: Remove dubious polling in LLMuteList::getInstance().Nat Goodspeed
The LLMuteList singleton instance might be requested before gMessageSystem is constructed. LLMuteList wants to register a couple gMessageSystem callbacks. Since gMessageSystem is not (yet) itself an LLSingleton, LLMuteList's constructor can't just call it into existence. Until now, LLMuteList overrode LLSingleton's getInstance() method: every time getInstance() was called, the subclass override method would check whether gMessageSystem had been initialized, and if so, register its callbacks before forwarding the call to the base-class LLSingleton::getInstance() method. Change to use LLPounceable::callWhenReady() instead. This is the reason gMessageSystem was made an LLPounceable.
2015-05-26Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2015-05-26MAINT-5232: Having an IF macro collides with helper libraries.Nat Goodspeed
Changing to IFF in the lex/yacc sources (which are supposedly deprecated on the viewer side anyway!) unbreaks Mac builds.
2015-05-26increment viewer version to 3.7.30Oz Linden
2015-05-23MAINT-5232: Convert gMessageSystem != NULL to simple bool test.Nat Goodspeed
Now that gMessageSystem is an LLPounceable, we would either have to define comparisons to LLPounceable's held type or static_cast<LLMessageSystem*> to literally compare to NULL. But since we already define operator bool(), that's the easy (and idiomatic) fix.
2015-05-23MAINT-5232: Make gMessageSystem an LLPounceable<LLMessageSystem*>.Nat Goodspeed
This will permit other subsystems to use gMessageSystem.callWhenReady() to (e.g.) register callbacks as soon as gMessageSystem is fully initialized.
2015-05-22MAINT-5232: Add LLPounceable template for delayed registrations.Nat Goodspeed
LLMuteList, an LLSingleton, overrides its getInstance() method to intercept control every time a consumer wants LLMuteList. This "polling" is to notice when gMessageSystem becomes non-NULL, and register a couple callbacks on it. Unfortunately there are a couple ways to request the LLMuteList instance without specifically calling the subclass getInstance(), which would bypass that logic. Moreover, the polling feels a bit dubious to start with. LLPounceable<T*> presents an idiom in which you can callWhenReady(callable) on the LLPounceable instance. If the T* is already non-NULL, it calls the callable immediately; otherwise it enqueues it for when the T* is set non-NULL. (This lets you "pounce" on the T* as soon as it becomes available, hence the name.) So if gMessageSystem were an LLPounceable<LLMessageSystem*>, LLMuteList's constructor could simply call gMessageSystem.callWhenReady() and relax: the callbacks would be registered either on LLMuteList construction or LLMessageSystem initialization, whichever comes later. LLPounceable comes with its very own set of unit tests. However, as of this commit it is not yet used in actual viewer code.
2015-05-22MAINT-5232: Clean up some dubious LLSingleton methods.Nat Goodspeed
Remove evil getIfExists() method, used by no one. Remove evil destroyed() method, used in exactly three places -- one of which is a test. Replace with equally evil instanceExists() method, which is used EVERYWHERE -- sigh.
2015-05-20MAINT-5232: Introduce SUBSYSTEM_CLEANUP() macroNat Goodspeed
and use it for existing LLSomeClass::cleanupClass() calls. This logs the fact of making the call, as well as making it.
2015-04-24mergeBrad Payne (Vir Linden)
2015-04-23increment viewer version to 3.7.29Oz Linden
2015-04-16Fix for bad syntax that displeased linux more than windows.Brad Payne (Vir Linden)
2015-04-16MAINT-5082 WIP, MAINT-5083 WIP - consolidate COF link creation calls during ↵Brad Payne (Vir Linden)
mass add of wearables/objects
2015-04-14remove dead member variablesOz Linden
2015-04-14MAINT-5082 WIP, MAINT-5083 WIP - batch up wear/add/take off/detach requests ↵Brad Payne (Vir Linden)
in inventory panel the same way we do now in appearance tab
2015-04-14MAINT-5097 FIXED crash in LLFloaterPay::onGiveandreykproductengine
2015-04-14remove disabled codeOz Linden
2015-04-14merge changes for MAINT-5090Oz Linden
2015-04-14MAINT-5090 Remove disabling HTTP Inventory from ViewerMnikolenko ProductEngine
2015-04-14merge changes for STORM-2113Oz Linden
2015-04-14minimal changes to compile on Xcode 6.2Oz Linden
2015-04-13mergeBrad Payne (Vir Linden)
2015-04-13merge changes for 3.7.27-releaseOz Linden
2015-04-13increment viewer version to 3.7.28Oz Linden
2015-04-11STORM-2113 - uri parsing cleanup and fixesCinder
2015-04-10restore the ll[io]fstream because we need them as wrappers on Windows for ↵Oz Linden
wide char paths; on other platforms they are now just typedefs to the std classes
2015-04-08fix validity errors in settings filesOz Linden
2015-04-07replace llifstream and llofstream with std::ifstream and std::ofstream ↵Oz Linden
respectively
2015-04-07convert llifstream and llofstream to std::ifstream and std::ofstream ↵Oz Linden
respectively
2015-04-07 MAINT-5023 FIXED URIparser crash in LLUrlEntryBase::urlToLabelWithGreyQueryMNikolenko ProductEngine
2015-04-07appearance utility source updatedBrad Payne (Vir Linden)
2015-04-07appearance utility source updatedBrad Payne (Vir Linden)
2015-04-02detect xml errors in parsing xml files and remove those filesOz Linden
2015-04-02add catch for possible exception in llsechandler_basic destructor (crash on ↵Oz Linden
exit)
2015-04-02improve logging of machine id generationOz Linden