Age | Commit message (Collapse) | Author |
|
The previous implementation went to some effort to crash if anyone attempted
to create or destroy an LLInstanceTracker subclass instance during traversal.
That restriction is manageable within a single thread, but becomes unworkable
if it's possible that a given subclass might be used on more than one thread.
Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(),
also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot()
and instance_snapshot(), the only means of iterating over LLInstanceTracker
instances. (These are intended to resemble functions, but in fact the current
implementation simply presents the classes.) Iterating over a captured
snapshot defends against container modifications during traversal. The term
'snapshot' reminds the coder that a new instance created during traversal will
not be considered. To defend against instance deletion during traversal, a
snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the
fly any that have expired.
Dereferencing instance_snapshot::iterator gets you a reference rather than a
pointer. Because some use cases want to delete all existing instances, add an
instance_snapshot::deleteAll() method that extracts the pointer. Those cases
used to require explicitly copying instance pointers into a separate
container; instance_snapshot() now takes care of that. It remains the caller's
responsibility to ensure that all instances of that LLInstanceTracker subclass
were allocated on the heap.
Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned
nullptr if that instance had been destroyed -- with new getWeak() method
returning std::weak_ptr<T>. Caller must detect expiration of that weak_ptr.
Adjust tests accordingly.
Use of std::weak_ptr to detect expired instances requires engaging
std::shared_ptr in the constructor. We now store shared_ptrs in the static
containers (std::map for keyed, std::set for unkeyed).
Make LLInstanceTrackerBase a template parameterized on the type of the static
data it manages. For that reason, hoist static data class declarations out of
the class definitions to an LLInstanceTrackerStuff namespace.
Remove the static atomic sIterationNestDepth and its methods incrementDepth(),
decrementDepth() and getDepth(), since they were used only to forbid creation
and destruction during traversal.
Add a std::mutex to static data. Introduce an internal LockStatic class that
locks the mutex while providing a pointer to static data, making that the only
way to access the static data.
The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer
expect ~LLInstanceTracker() to throw an exception in test programs.
That affects LLTrace::StatBase as well as LLInstanceTracker itself.
Adapt consumers to the new LLInstanceTracker API.
|
|
|
|
Use LLStringUtil::getenv() or getoptenv() whenever we fetch a string that will
be used as a pathname.
Use LLFile::tmpdir() instead of getenv("TEMP").
As an added extra-special bonus, finally clean up $TMP/llcontrol-test-zzzzzz
directories that have been accumulating every time we run a local build!
|
|
|
|
their attachments render at 0 LoD to prevent loading higher LoD complexity in memory thus deterring crashes.
Comments:
- Fix based on "RenderAutoMuteByteLimit" setting.
- File indra/llxml/llcontrol.h - add all signals to 0 group.
It garanty that handlers (in indra/newview/llviewercontrol.cpp) will be called last.
|
|
|
|
|
|
wide char paths; on other platforms they are now just typedefs to the std classes
|
|
respectively
|
|
respectively
|
|
[-Wunused-const-variable]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Control named RenderAutoMuteFunctionsnot found
|
|
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
|
|
consolidated most indra-specific constants in llcommon under indra_constants.h
fixed issues with operations on mixed unit types (implicit and explicit)
made LL_INFOS() style macros variadic in order to subsume other logging methods
such as ll_infos
added optional tag output to error recorders
|
|
Initial change made LLControlVariable::mPersist an enum, but retained
bool/BOOL public API. setPersist(true) set one value, setPersist(false) set
another, forcePersist() set the third. Per code review, expose enum to public,
make setPersist() (and LLControlVariable constructor, and LLControlGroup::
declareControl(), and all the LLControlGroup::declareMumble() methods, and all
the unit-test dummy declareMumble() method bodies) accept that enum. Remove
forcePersist(). Fix calls to LLControlGroup::declareMumble() accordingly.
Also rename PERSIST_YES to PERSIST_NONDFT, also per code review.
|
|
LLControlGroup::loadFromFile() can of course detect which LLControlGroup
instance it's loading. We only want to log unrecognized settings variables in
LLControlGroup "Global". Settings for "Don't show me this again" notifications
are in group "Warnings".
|
|
|
|
|
|
|
|
dependency cleanup - removed a lot of unecessary includes
|
|
Change LLControlVariable::mPersist from bool to tri-state enum. Its 'true'
value used to mean "persist only if changed from default;" third state now
means "persist regardless of value." Add forcePersist() method to set that.
Replace isSaveValueDefault() method -- used only by logic to determine whether
to save the variable -- with shouldSave() method to encapsulate ALL that logic
rather than only part of it. shouldSave() recognizes PERSIST_ALWAYS state.
When loading an unrecognized control variable from a user settings file, use
forcePersist() to ensure that we later save that variable again.
Tweak one of the unit tests to adjust for new semantics.
|
|
LLControlGroup::declareControl(), declareString() etc. etc. all used to return
BOOL -- which no one ever examines because it unconditionally returned TRUE.
Make it return the (possibly new) LLControlVariable* instead.
|
|
|
|
|
|
|
|
|
|
|
|
http error handlers to understand LLSD error responses. Fleshing out most http error handler message spam.
|
|
|
|
Most of the merge was clean, a couple conflicts.
Brought over a couple patches manually for llpolymesh.
|
|
|
|
alignment issue in llAppearance.
|
|
|
|
|
|
by Kelly
|
|
Appearance utility now reads avatar_lad.xml during stubbed out params processing.
|
|
Until now, adding a xui/en/strings.xml file in any non-default skin meant you
had to clone the entire file, editing only the particular entries you wanted
to override. With this change, we load strings.xml file(s) from the default
skin before loading the specified skin -- so a non-default skin can now
provide a strings.xml file containing only the specific entries it wants to
override.
|
|
|
|
|
|
cleaned up serialization of LLSD to param block so that it can round-trip
also, optimized LLXMLNode and fixed an assert
|
|
check the server response in an effort to ensure the viewer and server remain in sync. This is a partial commit as I still need to add user behavior and notifications when things go wrong.
|
|
preferences before login.
|