Commit Graph

39719 Commits (712a03300b674fa6e08031a6cdd2eec94df26c6e)

Author SHA1 Message Date
Nat Goodspeed 712a03300b SL-11216: Add llsd::drill() function to drill into an LLSD blob.
We include both const and non-const overloads. The latter returns LLSD&, so
you can assign to the located element.

In fact we already implemented the non-const logic in a less public form as
storeToLLSDPath() in lleventcoro.cpp. Reimplement the latter to use the new
llsd::drill() function.
2019-05-30 15:35:54 -04:00
Nat Goodspeed 0bb6f754a1 SL-11216: Convert LLVersionInfo to an LLSingleton.
This changeset is meant to exemplify how to convert a "namespace" class whose
methods are static -- and whose data are module-static -- to an LLSingleton.
LLVersionInfo has no initClass() or cleanupClass() methods, but the general
idea is the same.

* Derive the class from LLSingleton<T>:
  class LLSomeSingleton: public LLSingleton<LLSomeSingleton> { ... };
* Add LLSINGLETON(LLSomeSingleton); in the private section of the class. This
  usage implies a separate LLSomeSingleton::LLSomeSingleton() definition, as
  described in indra/llcommon/llsingleton.h.
* Move module-scope data in the .cpp file to non-static class members. Change
  any sVariableName to mVariableName to avoid being outright misleading.
* Make static class methods non-static. Remove '//static' comments from method
  definitions as needed.
* For LLVersionInfo specifically, the 'const std::string&' return type was
  replaced with 'std::string'. Returning a reference to a static or a member,
  const or otherwise, is an anti-pattern: the interface constrains the
  implementation, prohibiting possibly later returning a temporary (an
  expression).
* For LLVersionInfo specifically, 'const S32' return type was replaced with
  simple 'S32'. 'const' is just noise in that usage.
* Simple member initialization (e.g. the original initializer expressions for
  static variables) can be done with member{ value } initializers (no examples
  here though).
* Delete initClass() method.
* LLSingleton's forté is of course lazy initialization. It might work to
  simply delete any calls to initClass(). But if there are side effects that
  must happen at that moment, replace LLSomeSingleton::initClass() with
  (void)LLSomeSingleton::instance();
* Most initClass() initialization can be done in the constructor, as would
  normally be the case.
* Initialization that might cause a circular LLSingleton reference should be
  moved to initSingleton(). Override 'void initSingleton();' should be private.
* For LLVersionInfo specifically, certain initialization that used to be
  lazily performed was made unconditional, due to its low cost.
* For LLVersionInfo specifically, certain initialization involved calling
  methods that have become non-static. This was moved to initSingleton()
  because, in a constructor body, 'this' does not yet point to the enclosing
  class.
* Delete cleanupClass() method.
* There is already a generic LLSingletonBase::deleteAll() call in
  LLAppViewer::cleanup(). It might work to let this new LLSingleton be cleaned
  up with all the rest. But if there are side effects that must happen at that
  moment, replace LLSomeSingleton::cleanupClass() with
  LLSomeSingleton::deleteSingleton(). That said, much of the benefit of
  converting to LLSingleton is deleteAll()'s guarantee that cross-LLSingleton
  dependencies will be properly honored: we're trying to migrate the code base
  away from the present fragile manual cleanup sequence.
* Most cleanupClass() cleanup can be done in the destructor, as would normally
  be the case.
* Cleanup that might throw an exception should be moved to cleanupSingleton().
  Override 'void cleanupSingleton();' should be private.
* Within LLSomeSingleton methods, remove any existing
  LLSomeSingleton::methodName() qualification: simple methodName() is better.
* In the rest of the code base, convert most LLSomeSingleton::methodName()
  references to LLSomeSingleton::instance().methodName(). (Prefer instance() to
  getInstance() because a reference does not admit the possibility of NULL.)
* Of course, LLSomeSingleton::ENUM_VALUE can remain unchanged.

In general, for many successive references to an LLSingleton instance, it
can be useful to capture the instance() as in:

auto& versionInfo{LLVersionInfo::instance()};
// ... versionInfo.getVersion() ...

We did not do that here only to simplify the code review.

The STRINGIZE(expression) macro encapsulates:
std::ostringstream out;
out << expression;
return out.str();
We used that in a couple places.

For LLVersionInfo specifically, lllogininstance_test.cpp used to dummy out a
couple specific static methods. It's harder to dummy out
LLSingleton::instance() references, so we add the real class to that test.
2019-05-30 10:39:37 -04:00
Nat Goodspeed ca1d051a15 SL-11216: Remove LLSingletonBase::cleanupAll().
Remove call from LLAppViewer::cleanup().

Instead, make each LLSingleton<T>::deleteSingleton() call cleanupSingleton()
just before destroying the instance. Since deleteSingleton() is not a
destructor, it's fine to call cleanupSingleton() from there; and since
deleteAll() calls deleteSingleton() on every remaining instance, the former
cleanupAll() functionality has been subsumed into deleteAll().

Since cleanupSingleton() is now called at exactly one point in the instance's
lifetime, we no longer need a bool indicating whether it has been called.

The previous protocol of calling cleanupAll() before deleteAll() implemented a
two-phase cleanup strategy for the application. That is no longer needed.
Moreover, the cleanupAll() / deleteAll() sequence created a time window during
which individual LLSingleton<T> instances weren't usable (to the extent that
their cleanupSingleton() methods released essential resources) but still
existed -- so a getInstance() call would return the crippled instance rather
than recreating it.

Remove cleanupAll() calls from tests; adjust to new order of expected side
effects: instead of A::cleanupSingleton(), B::cleanupSingleton(), ~A(), ~B(),
now we get A::cleanupSingleton(), ~A(), B::cleanupSingleton(), ~B().
2019-05-30 08:23:32 -04:00
Nat Goodspeed 2672194b1d increment viewer version to 6.2.3 2019-05-21 08:57:32 -04:00
Nat Goodspeed 02ab47b256 Added tag 6.2.2-release for changeset ec09daf1899c 2019-05-21 08:57:32 -04:00
Steven Harrison (steven) 771e6344fe Pull from viewer-bear and merge 2019-05-17 16:49:58 +00:00
Steven Harrison (steven) 59c93cb861 SL-11213 No longer embedding the channel in the viewer release note urls. Update base URLs to match new viewer release note URL 2019-05-17 02:23:49 +00:00
AndreyL ProductEngine e31f4a352d Mac buildfix 2019-05-14 01:14:54 +03:00
Nat Goodspeed 34322f8f37 increment viewer version to 6.2.2 2019-05-07 15:24:01 -04:00
Nat Goodspeed 031ebc8d6d Added tag 6.2.1-release for changeset 706bdc7e25c6 2019-05-07 15:24:00 -04:00
Graham Linden 81c39d28fe Fix spurious assert from using highlights without binding highlight shader.
Only affects devs, but could have downstream consequences for rendering.
2019-04-30 14:25:48 -07:00
AndreyL ProductEngine 5e5c5ca09c Merged SL-10400 and SL-10401 2019-04-26 21:02:00 +03:00
Brad Payne (Vir Linden) a44f03573d SL-10400 - more on group limits from SimulatorFeatures 2019-04-26 14:23:57 +01:00
Brad Payne (Vir Linden) 06009e9b53 SL-10400 - get group limits from SimulatorFeatures 2019-04-25 22:02:47 +01:00
Brad Payne (Vir Linden) d1f5e87ad0 via viewer-neko - don't crash test viewer due to missing version checker 2019-04-23 15:31:25 +01:00
Brad Payne (Vir Linden) 099e58f75b SL-10401 - get agent attachment limit from SimulatorFeatures if available 2019-04-23 15:13:38 +01:00
AndreyL ProductEngine 59457cfcfe Merged in lindenlab/viewer-release (EAM) 2019-04-17 16:26:45 +03:00
Nat Goodspeed 81dbd3663b increment viewer version to 6.2.1 2019-04-17 09:17:16 -04:00
Nat Goodspeed 9d2a181ae8 Added tag 6.2.0-release for changeset 82a89165e592 2019-04-17 09:17:15 -04:00
AndreyL ProductEngine db6d4a3cb4 SL-10888 Fixed OSX mouse issues in HiDPI mode 2019-04-15 20:26:13 +03:00
eli 6b2a1762e1 FIX INTL-336 Viewer translation for 9 languages (Set 56) for viewer-bear 2019-04-15 12:09:30 -07:00
AndreyL ProductEngine 724e3cca96 SL-10891 Reset UI scale factor on first run if OS's display scaling is not 100% 2019-04-11 00:19:58 +03:00
AndreyL ProductEngine df8bd0c24f SL-10891 residues 2019-04-06 11:59:18 +03:00
AndreyL ProductEngine 457df9cd67 SL-10891 Reset UI scale factor on first run if OS's display scaling is not 100% 2019-04-06 10:12:27 +03:00
AndreyL ProductEngine 3c91eac8ee Backed out changeset: a2983d6277f2 2019-04-06 09:59:10 +03:00
andreykproductengine d1b649055d SL-10890 Ban duration edit field shows value with a left shift if a large value was set 2019-04-05 22:42:04 +03:00
AndreyL ProductEngine b6301eba2c SL-10891 Removed scaling to system UI size on Windows 2019-04-05 21:19:20 +03:00
AndreyL ProductEngine 64341c8b19 Merged in lindenlab/viewer-release 2019-04-02 22:19:20 +03:00
AndreyL ProductEngine 1470e82c89 Merged in lindenlab/viewer-release 2019-04-02 21:51:54 +03:00
Nat Goodspeed 5cf18cb867 increment viewer version to 6.1.2 2019-04-02 14:34:12 -04:00
Nat Goodspeed a3f4405cba Added tag 6.1.1-release for changeset 50f0ece62ddb 2019-04-02 14:34:12 -04:00
maxim_productengine e4b499e64d SL-10780 FIXED Speaker icon is shown for all friends 2019-03-22 17:31:26 +02:00
AndreyL ProductEngine ee39ebd523 Backed out changeset: 29f763ea2f9b
The fix caused SL-10357
2019-03-20 19:40:14 +02:00
AndreyL ProductEngine 8ec6aba9c0 Merged in callum_linden/viewer-release-cve-2019-5786 2019-03-19 21:42:46 +02:00
AndreyL ProductEngine 673e74606e Merged in callum_linden/viewer-release-cve-2019-5786 2019-03-19 21:41:40 +02:00
AndreyL ProductEngine 01f696b85e Merged in callum_linden/viewer-release-cve-2019-5786 2019-03-19 21:40:14 +02:00
callum@gmail.com 72f21b399e Pull in a change to Dullahan that allows user to specify flag that lets video/audio autoplay like it did before Chrome 70? (Dullahan v1.1.1320). Also sets a flag in media plugin CEF code to change the settings from false (default) to true 2019-03-18 15:36:16 -07:00
AndreyL ProductEngine 91baba4d9c Merged in callum_linden/viewer-release-cve-2019-5786 2019-03-16 01:32:31 +02:00
callum@gmail.com 2046e01f80 Pull in updated Dullahan (1.1.1313) with a fix for the DullahanHelper.app icon appearing in the Apple Dock 2019-03-15 14:36:21 -07:00
AndreyL ProductEngine 82d6273f33 Merged in callum_linden/viewer-release-cve-2019-5786 2019-03-14 19:51:52 +02:00
ruslantproductengine f632b4deae Fixed (#3) 2019-03-13 17:35:35 +02:00
callum@gmail.com 89f99f6ba4 Pull in Dullahan 1.1.1309 with fix for macOS version 2019-03-12 13:49:21 -07:00
callum_linden c2ff5a2878 Runtime files required by CEF changed in this version of CEF. We add them to the cef-bin and dullahan 3p packages but they were not copied to the right place - now they are 2019-03-08 21:29:32 -08:00
callum@gmail.com 9203140564 Pick up new version of Dullahan (1.1.1301) that doesn't crash because size change for browser surface was initiated too early 2019-03-08 19:12:19 -08:00
Rider Linden 5de9754e30 SL-10702: When attempting a new voice connection, ensure that the voicePump mail drop does not have any outstanding events. 2019-03-08 17:34:49 -08:00
AndreyL ProductEngine 83f4b8a775 Backed out changeset: a1ba5b935f34 2019-05-11 01:40:28 +03:00
callum@gmail.com 9b93382047 pull in updated 3p-cef-bin package: CEF 3.3626.1895.g7001d56 (Chromium 72.0.3626.121) with fix for CVE-2019-5786 2019-03-08 12:48:10 -08:00
Brad Payne (Vir Linden) 4e73121719 Don't create updater when running under debugger. 2019-03-04 20:24:00 +00:00
andreykproductengine 181e66fc12 Get rid of vstool 2019-03-06 16:31:11 +02:00
andreykproductengine 478e4f39d8 Fix for local studio builds 2019-03-04 14:59:33 +02:00