From 9e1c5338053d60263e2064d332990e5c6bb7a8a4 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 24 Jun 2016 11:29:45 +0200 Subject: [PATCH] Backed out changeset 8db8aca9022a (Remove temporary HttpRequestPumper eventnames from mainloop eventpump) to make room for LL fix --- indra/llcommon/lldependencies.h | 3 --- indra/llcommon/llevents.cpp | 8 -------- indra/llcommon/llevents.h | 2 -- indra/llmessage/llcorehttputil.cpp | 7 +------ 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/indra/llcommon/lldependencies.h b/indra/llcommon/lldependencies.h index 9e9e4e4dec..e0294e271b 100644 --- a/indra/llcommon/lldependencies.h +++ b/indra/llcommon/lldependencies.h @@ -721,9 +721,6 @@ public: template dep_range get_before_range(const KEY_OR_ITER& key) const; - void clearCache() - { mCache.clear(); } - private: DepNodeMap mNodes; mutable iterator_list mCache; diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index 25b89017cb..7beaf141ac 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -481,14 +481,6 @@ void LLEventPump::stopListening(const std::string& name) // avoid a new dependency sort in such cases. } -// Allow full unregister, or mDeps will grow and grow with stale entries from temporary HttpRequestPumper instances -void LLEventPump::removeFromDeps( std::string const &a_strName ) -{ - mDeps.remove( a_strName ); - mDeps.clearCache(); -} -// getListener(name).disconnect() because stopListening() also /// forgets this name. virtual void stopListening(const std::string& name); - void removeFromDeps( std::string const &a_strName ); // Allow full unregister, or mDeps will grow and grow with stale entries from temporary HttpRequestPumper instances - /// Post an event to all listeners. The @c bool return is only meaningful /// if the underlying leaf class is LLEventStream -- beware of relying on /// it too much! Truthfully, we return @c bool mostly to permit chaining diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 6e527cc62a..229bc9b3db 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -102,7 +102,6 @@ private: LLTempBoundListener mBoundListener; LLCore::HttpRequest::ptr_t mHttpRequest; - std::string mEventName; // Remember event name for unregister }; @@ -642,9 +641,8 @@ LLSD HttpCoroJSONHandler::parseBody(LLCore::HttpResponse *response, bool &succes HttpRequestPumper::HttpRequestPumper(const LLCore::HttpRequest::ptr_t &request) : mHttpRequest(request) { - mEventName = LLEventPump::inventName(); // Remember name for unregister mBoundListener = LLEventPumps::instance().obtain("mainloop"). - listen( mEventName, boost::bind(&HttpRequestPumper::pollRequest, this, _1)); + listen(LLEventPump::inventName(), boost::bind(&HttpRequestPumper::pollRequest, this, _1)); } HttpRequestPumper::~HttpRequestPumper() @@ -653,9 +651,6 @@ HttpRequestPumper::~HttpRequestPumper() { mBoundListener.disconnect(); } - - LLEventPumps::instance().obtain( "mainloop" ).removeFromDeps( mEventName ); // Unregister, or mDeps of mainloop pump will grow and grow with stale entries from temporary HttpRequestPumper instances - } bool HttpRequestPumper::pollRequest(const LLSD&)