summaryrefslogtreecommitdiff
path: root/indra
AgeCommit message (Collapse)Author
2019-08-19DRTVWR-493: Improve exception safety of LLSingleton initialization.Nat Goodspeed
Add try/catch clauses to constructSingleton() (to catch exceptions in the subclass constructor) and finishInitializing() (to catch exceptions in the subclass initSingleton() method). Each of these catch clauses rethrows the exception -- they're for cleanup, not for ultimate handling. Introduce LLSingletonBase::reset_initializing(list_t::size_t). The idea is that since we can't know whether the exception happened before or after the push_initializing() call in LLSingletonBase's constructor, we can't just pop the stack. Instead, constructSingleton() captures the stack size before attempting to construct the new LLSingleton subclass. On exception, it calls reset_initializing() to restore the stack to that size. Naturally that requires a corresponding LLSingleton_manage_master method, whose MasterList specialization is a no-op. finishInitializing()'s exception handling is a bit simpler because it has a constructed LLSingleton subclass instance in hand, therefore push_initializing() has definitely been called, therefore it can call pop_initializing(). Break out new static capture_dependency() method from finishInitializing() because, in the previous LLSingleton::getInstance() implementation, the logic now wrapped in capture_dependency() was reached even in the INITIALIZED case. TODO: Add a new EInitState to differentiate "have been constructed, now calling initSingleton()" from "fully initialized, normal case" -- in the latter control path we should not be calling capture_dependency(). The LLSingleton_manage_master<LLSingletonBase::MasterList> specialization's get_initializing() function (which called get_initializing_from()) was potentially dangerous. get_initializing() is called by push_initializing(), which (in the general case) is called by LLSingletonBase's constructor. If somehow the MasterList's LLSingletonBase constructor ended up calling get_initializing(), it would have called get_initializing_from(), passing an LLSingletonBase which had not yet been constructed into the MasterList. In particular, its mInitializing map would not yet have been initialized at all. Since the MasterList must not, by design, depend on any other LLSingletons, LLSingleton_manage_master<LLSingletonBase::MasterList>::get_initializing() need not return a list from the official mInitializing map anyway. It can, and should, and now does, return a static dummy list. That obviates get_initializing_from(), which is removed. That in turn means we no longer need to pass get_initializing() an LLSingletonBase*. Remove that parameter.
2019-08-19DRTVWR-493: When a test fails due to exception, display exception.Nat Goodspeed
2019-08-15SL-11662 - apparently a race condition between image loading and material ↵Brad Payne (Vir Linden)
property setting
2019-08-14DRTVWR-493: Work around static initialization order problem.Nat Goodspeed
LLParamSingleton contained a static member mutex. Unfortunately that wasn't guaranteed to be initialized by the time its getInstance() was entered. Use a function-local static instead.
2019-08-14No such thing as 'virtual static'Nat Goodspeed
2019-08-14Merged in lindenlab/viewer-releaseandreykproductengine
2019-08-13mergeBrad Payne (Vir Linden)
2019-08-13Merged in lindenlab/viewer-servalAndreyL ProductEngine
2019-08-13Merged in lindenlab/viewer-bearAndreyL ProductEngine
2019-08-13Merged in lindenlab/viewer-lynxAndreyL ProductEngine
2019-08-13Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2019-08-13DRTVWR-493 Test fix for W64andreykproductengine
2019-08-13DRTVWR-493 Converted LLViewerParcelMediaAutoPlay to singletonandreykproductengine
2019-08-13DRTVWR-493 Reworked a number of initsandreykproductengine
2019-08-13increment viewer version to 6.2.5Nat Goodspeed
2019-08-13SL-11718 Crash in LLRender2Dandreykproductengine
2019-08-13SL-11707 FIXED [Maint] Incorrect sound length limit referenced.maxim_productengine
2019-08-12DRTVWR-493: Rely on recursive_mutex to handle circularityNat Goodspeed
from LLParamSingleton::initSingleton().
2019-08-12Automated merge with ssh://bitbucket.org/andreykproductengine/drtvwr-493Nat Goodspeed
2019-08-12DRTVWR-493: Permit LLParamSingleton::initSingleton() circularity.Nat Goodspeed
This was forbidden, but AndreyK points out cases in which LLParamSingleton:: initSingleton() should in fact be allowed to circle back to its own instance() method. Use a recursive_mutex instead of plain mutex to permit that; remove LL_ERRS preventing it. Add LLParamSingleton::instance() method that calls LLParamSingleton::getInstance(). Inheriting LLSingleton::instance() called LLSingleton::getInstance() -- not at all what we want. Add LLParamSingleton unit tests.
2019-08-12DRTVWR-493 LLWearableType to LLParamSingletonandreykproductengine
2019-08-12Merge from nat_linden/drtvwr-493andreykproductengine
2019-08-12SL-11719 Initialize the conversation dialog on login screen appearance to ↵AndreyL ProductEngine
avoid crash
2019-08-12Automated merge with file:///Users/nat/linden/viewer-catchNat Goodspeed
2019-08-12DRTVWR-493: Streamline LLParamSingleton, LLLockedSingleton.Nat Goodspeed
Simplify LLSingleton::SingletonLifetimeManager to SingletonInitializer: that struct has not been responsible for deletion ever since LLSingletonBase acquired dependency-ordered deleteAll(). Move SingletonData::mInitState changes from SingletonLifetimeManager to constructSingleton() method. Similarly, constructSingleton() now sets SingletonData::mInstance instead of making its caller store the pointer. Add variadic arguments to LLSingleton::constructSingleton() so we can reuse it for LLParamSingleton. Add finishInitializing() method to encapsulate logic reused for getInstance()'s INITIALIZING and DELETED cases. Make LLParamSingleton a subclass of LLSingleton, just as LLLockedSingleton is a subclass of LLParamSingleton. Make LLParamSingleton a friend of LLSingleton, so it can access private members of LLSingleton without also granting access to any DERIVED_CLASS subclass. This eliminates the need for protected getInitState(). LLParamSingleton::initParamSingleton() reuses LLSingleton::constructSingleton() and finishInitializing(). Its getInstance() method completely replaces LLSingleton::getInstance(): in most EInitStates, LLParamSingleton::getInstance() is an error. Use a std::mutex to serialize calls to LLParamSingleton::initParamSingleton() and getInstance(). While LLSingleton::getInstance() relies on the "initialized exactly once" guarantee for block-scope static declarations, LLParamSingleton cannot rely on the same mechanism. LLLockedSingleton is now a very succinct subclass of LLParamSingleton -- they have very similar functionality. Giving the LLSINGLETON() macro variadic arguments eliminates the need for a separate LLPARAMSINGLETON() macro, while continuing to support existing usage.
2019-08-12DRTVWR-493: Make catch_llerrs() a member of WrapLLErrs.Nat Goodspeed
2019-08-12Automated merge with ssh://bitbucket.org/nat_linden/viewer-vs2017Nat Goodspeed
2019-08-11DRTVWR-493 tiny optimizationandreykproductengine
2019-08-10DRTVWR-493: Introduce test catch_what(), catch_llerrs() functions.Nat Goodspeed
Use them in place of awkward try/catch test boilerplate.
2019-08-10DRTVWR-493 LLUI to LLParamSingletonandreykproductengine
2019-08-10DRTVWR-493 LLRender2D init cleanupandreykproductengine
2019-08-10SL-11716 Fixed crash on initializing LLUIAndreyL ProductEngine
2019-08-09SL-9699 Login selectionandreykproductengine
2019-08-19SL-11692 FIXED The "Walk / run / fly..." menu item is not checked when in usemaxim_productengine
2019-08-19SL-11749 FIXED Show in search grayed out at 128m minimummaxim_productengine
2019-08-16SL-11740 FIXED Wrong entries in conversation.log for groups with | in the namemaxim_productengine
2019-08-15SL-209 Cleanup Merchant Outboxandreykproductengine
2019-08-14SL-11674 Update bulk upload warningmaxim_productengine
2019-08-06SL-9815 An error prompts the user to teleport when they have no credencials setandreykproductengine
2019-08-06SL-10908 Test viewers should crash normallyandreykproductengine
2019-08-05SL-10908 One more safeguardandreykproductengine
2019-07-31SL-11657 Separated expected from current inventory serial for better sync ↵andreykproductengine
and to fix partial loads
2019-08-01SL-7628 Camera doesn't follow avatar, while avatar is sitting on physical objectandreykproductengine
2019-08-01SL-11666 Fixed the search menu button being over Linden dollar balanceandreykproductengine
2019-07-30SL-11651 Add 'whole word only' search and 'multi-partial name' search to ↵maxim_productengine
Inventory Filter
2019-07-29SL-10047 Confusing language for Russian error message translationandreykproductengine
2019-07-29SL-9189 Add ability to rename gesture in Gesture listmaxim_productengine
2019-07-26SL-8380 Ability to disable 2D UI tooltipsandreykproductengine
2019-07-25DRTVWR-493 LLRender2D to LLParamSingletonandreykproductengine
2019-07-25SL-10962 Support for suppressing JavaScript dialogs in the media plugin codeAndreyL ProductEngine