Commit Graph

84 Commits (231b89a4689b34087b1d58f8b70b662a8fd3dc21)

Author SHA1 Message Date
Ansariel 231b89a468 Merge branch 'DRTVWR-497' of https://bitbucket.org/lindenlab/viewer 2020-07-23 23:16:58 +02:00
Dave Houlton 64a9ad0f5f Merge branch 'master' v6.4.6 into DRTVWR-497 2020-07-23 12:21:18 -06:00
Nicky Dasmijn f116ea4cb7 Merge remote-tracking branch 'fs/master' into fs-vs2017-d476
(Note: This removed our changed dullahan, but that's okay as it is
vs2013)
2020-07-20 09:58:30 +02:00
Ansariel 3884e4b6dd Merge offline IM fixes 2020-07-19 17:42:28 +02:00
Andrey Kleshchev 97a33b8322 SL-13540 Fix line endings 2020-07-06 16:53:41 +03:00
Nat Goodspeed 5ab0ff486b DRTVWR-476, SL-11430: Merge branch 'SL-9756' into d476 2020-07-02 13:24:29 -04:00
Andrey Kleshchev bf5585c0ec SL-13540 Offline scripted inventory offers not shown on non drtsim-451 2020-07-02 19:05:12 +03:00
Rider Linden 766b21a0a6 SL-13533: Use the old name for from_agent_name
SL-13540: Do not fail if binary bucket is too large, attempt to extract the asset type from the old style bucket. Notification still not shown.
2020-07-02 19:05:12 +03:00
Andrey Kleshchev 6f388f2276 SL-13540 Offline scripted inventory offers not shown on non drtsim-451 2020-07-02 19:01:48 +03:00
Rider Linden 127f2b3994 SL-13533: Use the old name for from_agent_name
SL-13540: Do not fail if binary bucket is too large, attempt to extract the asset type from the old style bucket. Notification still not shown.
2020-07-02 19:01:48 +03:00
Nat Goodspeed a075a73920 DRTVWR-476: Merge branch 'SL-9756' into d476. 2020-06-30 16:59:17 -04:00
Rider Linden 01f2308c85 SL-9756: Get the LLSD names right. 2020-06-30 23:13:05 +03:00
Rider Linden f72759c16d SL-9756: IM_TASK_INVENTORY_OFFERED bucket offline format conforms to the online format. 2020-06-30 23:13:05 +03:00
Rider Linden f8e53adce7 SL-9756: Get session_id/transaction id from aux if session is missing. 2020-06-30 23:13:04 +03:00
Rider Linden c8b7466c19 SL-11430, SL-9756: Take transaction-id from offline messages. Correct LLSD names. Use offline flag rather than implicit tests of session_id and aux_id. 2020-06-30 23:13:04 +03:00
Rider Linden e2dd15397c SL-9756: Take the "session_id" from the offline message that was passed. 2020-06-30 23:13:04 +03:00
Rider Linden 374652a2d9 SL-9756: Get the LLSD names right. 2020-06-30 19:07:45 +03:00
Rider Linden c118c7863d SL-9756: IM_TASK_INVENTORY_OFFERED bucket offline format conforms to the online format. 2020-06-30 19:07:45 +03:00
Rider Linden 34be4fab98 SL-9756: Get session_id/transaction id from aux if session is missing. 2020-06-30 19:07:45 +03:00
Rider Linden ef2e575c0a SL-11430, SL-9756: Take transaction-id from offline messages. Correct LLSD names. Use offline flag rather than implicit tests of session_id and aux_id. 2020-06-30 19:07:45 +03:00
Rider Linden 45e956d0fb SL-9756: Take the "session_id" from the offline message that was passed. 2020-06-30 19:07:45 +03:00
Kitty Barnett a6e18a4450 Merge with RLVa (v2.2.1)
-> Should be as close to a null-merge as we can get
  -> Some commits were cherry picked in on the FS master branch
2020-06-10 23:16:58 +02:00
Nat Goodspeed ca6f092929 DRTVWR-476: Merge branch 'master' of lindenlab/viewer into DRTVWR-476-boost-1.72 2020-05-06 16:06:26 -04:00
Nicky Dasmijn a4aff377e6 Merge branch 'master' into fs-vs2017 2020-04-29 20:02:19 +02:00
Ansariel 6733ae0a95 Sync offline inventory offer from task with upstream - apparently this change got lost at some point 2020-04-28 15:30:46 +02:00
Nat Goodspeed 9d5b897600 DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.
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.
2020-03-25 15:28:17 -04:00
Andrey Lihatskiy a52ef7ad60 Merge branch 'DRTVWR-499' into DRTVWR-500 2020-02-03 15:13:37 +02:00
Ansariel 4595476154 Merge DRTVWR-499 2020-01-31 08:42:19 +01:00
andreykproductengine a8437a7636 potential crashfix 2020-01-29 18:02:41 +02:00
Nicky Dasmijn a135b5b428 Merge remote-tracking branch 'origin/ll-vs2017' into fs-vs2017 2019-12-21 13:14:51 +01:00
Nat Goodspeed 24499ac66f Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2019-12-13 12:30:03 -05:00
Ansariel bb95a21ebf Merge 2019-11-28 18:50:36 +01:00
Ansariel 797fa6718b Merge 494-maint-wassail 2019-11-28 17:09:26 +01:00
AndreyL ProductEngine bc496f5f17 Downstream merge from lindenlab/viewer-lynx 2019-11-27 22:58:52 +02:00
AndreyL ProductEngine f89c9e9b20 Downstream merge from lindenlab/viewer-serval 2019-11-27 22:57:13 +02:00
AndreyL ProductEngine 216fe3d47f Merged in pe_devs/494-wassail 2019-11-27 22:36:28 +02:00
Nat Goodspeed b2913b7cf1 DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.
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.
2019-12-02 14:39:24 -05:00
AndreyL ProductEngine 8a0338bda0 Backed out changeset: 3ea1714b65b8 2019-11-20 21:41:27 +02:00
Ansariel 3bc189bda7 Merge Firestorm LGPL 2019-11-19 20:28:09 +01:00
Ansariel fd4b8a7bb1 Merge Firestorm LGPL 2019-11-12 18:45:02 +01:00
AndreyL ProductEngine 91fa31c065 Downstream merge from lindenlab/viewer-serval 2019-11-12 04:24:35 +02:00
AndreyL ProductEngine 5f731d84cb Downstream merge from 494-maint-wassail 2019-11-12 02:37:15 +02:00
AndreyL ProductEngine 84f3b2865f Merged in lindenlab/viewer-release 2019-11-12 00:39:07 +02:00
Ansariel 6e340961c0 Merge viewer-neko 2019-10-30 18:05:01 +01:00
Ansariel 46f739f348 Merge viewer-lynx 2019-10-29 18:32:17 +01:00
andreykproductengine 43809e1c5c SL-12180 Crash on requestOfflineMessagesCoro 2019-10-23 22:37:59 +03:00
Ansariel d79b79fbe2 Merge viewer-ordered-shutdown 2019-10-19 03:16:10 +02:00
Ansariel 146d527104 Merge viewer-neko 2019-10-09 22:05:52 +02:00
AndreyL ProductEngine 12baf75878 Downstream merge from lindenlab/viewer-manul 2019-10-09 19:32:19 +03:00
Rider Linden 3feba8be0d SL-11430: Transaction ID is passed as aux_id from offline message. No special parsing required to get type from binary_bucket. 2019-10-01 16:49:33 -07:00