summaryrefslogtreecommitdiff
path: root/indra/viewer_components/login
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-07-18 13:29:34 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-07-18 13:29:34 -0400
commitf2f0fa7fd0efc221f1358dd4e440b5d51a5fb8b4 (patch)
tree4410b8b9e87350e244acf8fb738a93bbd211e267 /indra/viewer_components/login
parent35ee96709ef2704a2636a11c67d61190dd6bdd50 (diff)
Ditch `LLEventTrackable` aka `boost::signals2::trackable`.
Remove documented `LLEventPump` support for `LLEventTrackable`. That claimed support was always a little bit magical/fragile. IF: * a class included `LLEventTrackable` as a base class AND * an instance of that class was managed by `boost::shared_ptr` AND * you passed one of that class's methods and the `boost::shared_ptr` specifically to `boost::bind()` AND * the resulting `boost::bind()` object was passed into `LLEventPump::listen()` THEN the promise was that on destruction of that object, that listener would automatically be disconnected -- instead of leaving a dangling pointer bound into the `LLEventPump`, causing a crash on the next `LLEventPump::post()` call. The only existing code in the viewer code base that exercised `LLEventTrackable` functionality was in test programs. When the viewer calls `LLEventPump::listen()`, it typically stores the resulting connection object in an `LLTempBoundListener` variable, which guarantees disconnection on destruction of that variable. The fact that `LLEventTrackable` support is specific to `boost::bind()`, that it silently fails to keep its promise with `std::bind()` or a lambda or any other form of C++ callable, makes it untrustworthy for new code. Note that the code base still uses `boost::signals2::trackable` for other `boost::signals2::signal` instances not associated with `LLEventPump`. We are not changing those at this time.
Diffstat (limited to 'indra/viewer_components/login')
-rw-r--r--indra/viewer_components/login/tests/lllogin_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 8aea3b37aa..f051f8c67f 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -66,7 +66,7 @@
* Helper classes
*****************************************************************************/
// This is a listener to receive results from lllogin.
-class LoginListener: public LLEventTrackable
+class LoginListener
{
std::string mName;
LLSD mLastEvent;
@@ -137,7 +137,7 @@ public:
}
};
-class LLXMLRPCListener: public LLEventTrackable
+class LLXMLRPCListener
{
std::string mName;
LLSD mEvent;