Age | Commit message (Collapse) | Author |
|
|
|
In a number of places, the viewer uses a lookup based on std::type_info*. We
used to use std::map<std::type_info*, whatever>. But on Linux,
&typeid(SomeType) can produce different pointer values, depending on the
dynamic load module in which the code is executed. Introduce
LLTypeInfoLookup<T>, with an API that deliberately mimics
std::map<std::type_info*, T>. LLTypeInfoLookup::find() first tries an
efficient search for the specified std::type_info*. But if that fails, it
scans the underlying container for a match on the std::type_info::name()
string. If found, it caches the new std::type_info* to optimize subsequent
lookups with the same pointer.
Use LLTypeInfoLookup instead of std::map<std::type_info*, ...> in
llinitparam.h and llregistry.h.
Introduce LLSortedVector<KEY, VALUE>, a std::vector<std::pair<KEY, VALUE>>
maintained in sorted order with binary-search lookup. It presents a subset of
the std::map<KEY, VALUE> API.
|
|
Every LEAP plugin gets its own LLLeapListener, managing its own collection of
listeners to various LLEventPumps. LLLeapListener's command LLEventPump now
has a UUID for a name, both for uniqueness and to make it tough for a plugin
to mess with any other.
|
|
Instantiating LLLeap with a command to execute a particular child process sets
up machinery to speak LLSD Event API Plugin protocol with that child process.
LLLeap is an LLInstanceTracker subclass, so the code that instantiates need
not hold the pointer. LLLeap monitors child-process termination and deletes
itself when done.
|
|
run_build_test.py already has the capability to set environment variables, and
we may as well direct it to set PYTHON to the running Python interpreter. That
completely eliminates one level of process wrapper.
|
|
|
|
LLProcessLauncher had the somewhat fuzzy mandate of (1) accumulating
parameters with which to launch a child process and (2) sometimes tracking the
lifespan of the ensuing child process. But a valid LLProcessLauncher object
might or might not have ever been associated with an actual child process.
LLProcess specifically tracks a child process. In effect, it's a fairly thin
wrapper around a process HANDLE (on Windows) or pid_t (elsewhere), with
lifespan management thrown in. A static LLProcess::create() method launches a
new child; create() accepts an LLSD bundle with child parameters. So building
up a parameter bundle is deferred to LLSD rather than conflated with the
process management object.
Reconcile all known LLProcessLauncher consumers in the viewer code base,
notably the class unit tests.
|
|
by everyone
|
|
moved LLInitParam, and LLRegistry to llcommon
moved LLUIColor, LLTrans, and LLXUIParser to llui
reviewed by Nat
|
|
Run INTEGRATION_TEST_llprocesslauncher using setpython.py so we can find the
Python interpreter of interest.
Introduce python() function to run a Python script specified using
NamedTempFile conventions.
Introduce a convention by which we can read output from a Python script using
only the limited pre-January-2012 LLProcessLauncher API. Introduce
python_out() function to leverage that convention.
Exercise a couple of LLProcessLauncher methods using all the above.
|
|
Add unit tests to verify basic functionality.
|
|
As always with llcommon, this is expressed as an "integration test" to
sidestep a circular dependency: the llcommon build depends on its unit tests,
but all our unit tests depend on llcommon.
Initial test code is more for human verification than automated verification:
does APR's child-process management in fact support nonblocking operations?
|
|
|
|
|
|
|
|
interface.
|
|
|
|
Added a simple unit test to verify the functionality of the deleteSingleton method.
|
|
|
|
|
|
of old code related to earlier accounting work.
|
|
|
|
|
|
That, in turn, needs Boost.System library.
|
|
This is in its infancy; tested on Mac; needs to be ironed out on Windows and
Linux. Goal is to test at least some cross-language LLSD serialization.
|
|
|
|
|
|
This library was only needed on the Mac, and only with the OS X 10.4 SDK. As
of October 2010, we no longer build the viewer with that SDK. The 10.5 SDK
we're currently using directly supports the functionality for which we
originally brought in Pth.
|
|
Instead of OS Version
Modified Mac OS_VERSION string to include OS X version number in addition to Kernel version info.
DARWIN llcommon build now depends on Carbon in order to provide this functionality.
Reviewed by Richard.
|
|
|
|
|
|
boundaries.
|
|
|
|
accessed through the static LLThread::tldata().
Currently this object contains two (public) thread-local
objects: a LLAPRRootPool and a LLVolatileAPRPool.
The first is the general memory pool used by this thread
(and this thread alone), while the second is intended
for short lived memory allocations (needed for APR).
The advantages of not mixing those two is that the latter
is used most frequently, and as a result of it's nature
can be destroyed and reconstructed on a "regular" basis.
This patch adds LLAPRPool (completely replacing the old one),
which is a wrapper around apr_pool_t* and has complete
thread-safity checking.
Whenever an apr call requires memory for some resource,
a memory pool in the form of an LLAPRPool object can
be created with the same life-time as this resource;
assuring clean up of the memory no sooner, but also
not much later than the life-time of the resource
that needs the memory.
Many, many function calls and constructors had the
pool parameter simply removed (it is no longer the
concern of the developer, if you don't write code
that actually does an libapr call then you are no
longer bothered with memory pools at all).
However, I kept the notion of short-lived and
long-lived allocations alive (see my remark in
the jira here: https://jira.secondlife.com/browse/STORM-864?focusedCommentId=235356&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235356
which requires that the LLAPRFile API needs
to allow the user to specify how long they
think a file will stay open. By choosing
'short_lived' as default for the constructor
that immediately opens a file, the number of
instances where this needs to be specified is
drastically reduced however (obviously, any
automatic LLAPRFile is short lived).
***
Addressed Boroondas remarks in https://codereview.secondlife.com/r/99/
regarding (doxygen) comments. This patch effectively only changes comments.
Includes some 'merge' stuff that ended up in llvocache.cpp
(while starting as a bug fix, now only resulting in a cleanup).
***
Added comment 'The use of apr_pool_t is OK here'.
Added this comment on every line where apr_pool_t
is correctly being used.
This should make it easier to spot (future) errors
where someone started to use apr_pool_t; you can
just grep all sources for 'apr_pool_t' and immediately
see where it's being used while LLAPRPool should
have been used.
Note that merging this patch is very easy:
If there are no other uses of apr_pool_t in the code
(one grep) and it compiles, then it will work.
***
Second Merge (needed to remove 'delete mCreationMutex'
from LLImageDecodeThread::~LLImageDecodeThread).
***
Added back #include <apr_pools.h>.
Apparently that is needed on libapr version 1.2.8.,
the version used by Linden Lab, for calls to
apr_queue_*. This is a bug in libapr (we also
include <apr_queue.h>, that is fixed in (at least) 1.3.7.
Note that 1.2.8 is VERY old. Even 1.3.x is old.
***
License fixes (GPL -> LGPL). And typo in comments.
Addresses merov's comments on the review board.
***
Added Merov's compile fixes for windows.
|
|
Until now, LLEventAPI has only been able to register functions specifically
accepting(const LLSD&). Typically you add a wrapper method to your LLEventAPI
subclass, register that, have it extract desired params from the incoming LLSD
and then call the actual function of interest.
With help from Alain, added new LLEventAPI::add() methods capable of
registering functions/methods with arbitrary parameter signatures. The code
uses boost::fusion magic to implicitly match incoming LLSD arguments to the
function's formal parameter list, bypassing the need for an explicit helper
method.
New add() methods caused an ambiguity with a previous convenience overload.
Removed that overload and fixed the one existing usage.
Replaced LLEventDispatcher::get() with try_call() -- it's no longer easy to
return a Callable for caller to call directly. But the one known use of that
feature simply used it to avoid fatal LL_ERRS on unknown function-name string,
hence the try_call() approach actually addresses that case more directly.
Added indra/common/lleventdispatcher_test.cpp to exercise new functionality.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SNOW-748)
|
|
complete) implementation in llimagej2c
|
|
occurrences (i.e. two spaces only)
|
|
overrides - fpic or -fPIC"
Originally commited at http://svn.secondlife.com/trac/linden/changeset/3499/projects/2010/snowglobe and http://svn.secondlife.com/trac/linden/changeset/3501
SVN changeset 3499 partially applied with --ignore-whitespace:
Hunk #1 FAILED at 259.
Hunk #2 FAILED at 265.
2 out of 2 hunks FAILED -- saving rejects to file
indra/llcommon/CMakeLists.txt.rej
patching file indra/media_plugins/webkit/CMakeLists.txt
Hunk #1 succeeded at 33 with fuzz 1 (offset -8 lines).
patching file indra/media_plugins/base/CMakeLists.txt
patching file indra/media_plugins/gstreamer010/CMakeLists.txt
patching file indra/media_plugins/example/CMakeLists.txt
patching file indra/llplugin/CMakeLists.txt
Manually applied to indra/llcommon/CMakeLists.txt (straight forward).
SVN changeset 3501 applied with fuzz 1:
patching file indra/media_plugins/webkit/CMakeLists.txt
Hunk #1 succeeded at 33 with fuzz 1 (offset -8 lines).
Hunk #2 succeeded at 39 with fuzz 1 (offset -8 lines).
No further changes other than that.
|
|
code linking into the DSO
Formatting, cleanup, and one minor change by Techwolf Lupindo.
Minor change was a move of the hunk in
indra/media_plugins/webkit/CmakeLists.txt to same area as the other plugins CmakeLists.txt files.
daggyfied version of https://bitbucket.org/Techwolf/viewer-development/changeset/00bd21962052
|
|
|
|
|