Commit Graph

270 Commits (c5e3ace94de01ed61ed43284ea72dacec197cdc9)

Author SHA1 Message Date
Andrey Kleshchev 1d79d101ec SL-17040 Crash when looking for a region by handle or position
Might be a better idea to turn LLWorld back into an LLSingleton. Too many things to track.
2022-03-21 21:14:20 +02:00
Andrey Kleshchev ca6121979c SL-14796 Updated code accordingly to changed event order 2021-02-04 18:06:17 +02:00
Andrey Kleshchev 1dd32bb772 SL-14796 After teleporting, add notation into Nearby Chat 2021-02-03 20:05:20 +02:00
Andrey Lihatskiy a9885029cf Merge branch 'master' into DRTVWR-507-maint 2020-08-18 19:11:34 +03:00
Andrey Lihatskiy f77a30f740 Merge branch 'master' into DRTVWR-507-maint
# Conflicts:
#	autobuild.xml
2020-07-21 11:30:48 +03:00
Andrey Lihatskiy 7bbf3f5f7f Merge branch 'master' into DRTVWR-501-maint
# Conflicts:
#	autobuild.xml
#	indra/newview/llimprocessing.cpp
2020-07-20 22:24:10 +03:00
Andrey Kleshchev 9751942372 Small Cleanup 2020-05-18 18:33:08 +03: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
andreykproductengine 9c1e849083 SL-12305 More missing-file handling
instance().getCurFileName() was returning empty value despite supposedly non-empty filename
2019-11-18 20:12:50 +02:00
andreykproductengine 1d3266910c MAINT-8742 Crashes at draw and getHandle 2018-06-08 20:22:36 +03:00
Andrey Kleshchev 6bb9ec4195 MAINT-8498 Fixed item offers not appearing after friednship offer 2018-04-17 13:11:53 +00:00
Mnikolenko ProductEngine 548b372af2 MAINT-7629 FIXED Crash in LLSpeakerMgr::findSpeaker(LLUUID const &) 2017-07-24 17:48:55 +03:00
andreykproductengine e72c120e9e MAINT-6805 Fixed Right-click menus in the right and left panes of the Conversations windows are different 2017-05-17 22:34:50 +03:00
andreykproductengine 605160d501 MAINT-7118 Swapping legacy people API with new cache 2017-02-15 20:40:03 +02:00
andreykproductengine efa716b5fc MAINT-2129 "Block" button doesn't become disabled 2016-05-18 19:29:31 +03:00
AndreyL ProductEngine b25a22a2c1 Merged in lindenlab/viewer-release 2016-05-19 23:02:37 +03:00
andreykproductengine 1241558dbf MAINT-2129 "Block" button doesn't become disabled in remote object inspector after object has been added to block list 2016-04-20 19:40:19 +03:00
Oz Linden bc22e58743 merge changes for 4.0.1-release 2016-01-15 16:55:04 -05:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Mnikolenko ProductEngine 43e06e0352 MAINT-925 FIXED Objects called "Second Life" are unclickable & unmuteable via local chat 2015-10-15 12:10:17 +03:00
Mnikolenko ProductEngine 70a31d5c6b MAINT-14 FIXED Region message logged into nearby chat log has duplicated sender name 2015-06-11 12:57:18 +03:00
Mnikolenko ProductEngine 9a13f4270b MAINT-14 FIXED Treat region message like a system message, but also show sender name. 2015-06-08 11:56:14 +03:00
Mnikolenko ProductEngine 3be738dc6c MAINT-5020 FIXED Determine the need to use bracket via chat source. 2015-03-31 12:40:43 +03:00
Mnikolenko ProductEngine e3f62a54e6 MAINT-4597 FIXED Show emoted name according to name settings in preferences. 2014-10-27 13:26:17 +02:00
Stinson Linden 205503dd84 MAINT-4009: Patching the memory leak occurring from the info icons that appear when hovering over a chat history item. 2014-05-02 23:04:06 +01:00
Richard Linden 5b846ed2a6 merge with release 2014-03-12 12:48:43 -07:00
simon cfadbe631f Revert earlier back-out for MAINT-535 ... it's back in 2014-01-10 13:15:19 -08:00
simon f291995dac Revert changes made for MAINT-535 to test in a release cohort. 2014-01-07 15:18:29 -08:00
Richard Linden 34ff2fc46b merge with release 2013-12-02 14:57:29 -08:00
simon 5756b7b3d0 Merge - doh! 2013-11-25 09:17:29 -08:00
Mnikolenko ProductEngine 44eaa10b80 MAINT-3068 FIXED "Request Teleport" menu item is added to context menu. 2013-11-12 14:51:43 +02:00
Richard Linden 17e9c872ad Automated merge with http://bitbucket.org/lindenlab/viewer-release 2013-11-11 19:17:49 -08:00
Graham Linden 10705b4360 Merge 3.6.11 for RC-ability 2013-11-11 15:50:01 -08:00
Graham Linden 970ee73e9a Fix release merge issues (included upstream changes not yet in release from bear) 2013-10-25 11:48:43 -07:00
Richard Linden 697d2e720b renamed TimeBlock to BlockTimerStatHandle 2013-10-15 20:24:42 -07:00
Richard Linden 80dfbbaacd merge from viewer-release 2013-10-08 11:59:24 -07:00
Richard Linden 52da9f5f49 merge with viewer-release 2013-09-09 18:58:41 -07:00
simon_linden e2019e8a3b Merge downstream code with viewer-release 2013-09-09 16:17:16 -07:00
Richard Linden cbe397ad13 changed fast timer over to using macro
another attempt to move mem stat into base class
2013-09-05 14:04:13 -07:00
mberezhnoy a0244eb6f9 MAINT-3073 ([CHUIBUG](You) feature is irritating, especially for emotes) 2013-09-04 09:20:33 +03:00
maksymsproductengine 19f20baffb MAINT-2575 FIXED Resident can accept unlimited number of friendship requests if they were sent before his first accept 2013-08-23 20:31:02 +03:00
dmitry 8735f383c8 MAINT-3068 FIXED Inconsistent option menus on resident names in Conversations floater 2013-08-29 11:47:46 +03:00
Mnikolenko ProductEngine 28339afa15 MAINT-535 'trust model' is added for secondlife:// URLs in wiki style links. Chat history is marked as untrusted source now. 2013-10-22 12:47:16 +03:00
MaximB ProductEngine 98529440c6 MAINT-3305 ('Chat history' is enabled in contex menu for yourself.) 2013-10-15 18:38:05 +03:00
mberezhnoy 882ab04ef3 CHUI-809 (Right-click menu on user name in compat chat mode doesn't have "IM")
Added callback for friendship checking
2013-06-13 20:21:24 +03:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
mberezhnoy 255159c50f CHUI-886 (Time in front of the name is not displayed when the Conversations size is reduced to a minimum.) 2013-04-01 08:53:44 +03:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Mnikolenko ProductEngine d81226f170 CHUI-809 FIXED Changes in menu items to make them consistent. Do not start IM if selected person is self. 2013-03-12 15:38:10 +02:00
Mnikolenko ProductEngine d2a689be4a CHUI-815 FIXED Display whispered text in italics and shouted text as bold 2013-03-11 15:30:49 +02:00