summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llcorehttp/examples/http_texture_load.cpp11
-rwxr-xr-xindra/newview/llappcorehttp.cpp12
-rwxr-xr-xindra/newview/llmeshrepository.cpp13
-rwxr-xr-xindra/newview/lltexturefetch.cpp12
4 files changed, 37 insertions, 11 deletions
diff --git a/indra/llcorehttp/examples/http_texture_load.cpp b/indra/llcorehttp/examples/http_texture_load.cpp
index 737282c7df..b91aaf0593 100755
--- a/indra/llcorehttp/examples/http_texture_load.cpp
+++ b/indra/llcorehttp/examples/http_texture_load.cpp
@@ -361,7 +361,7 @@ int main(int argc, char** argv)
<< std::endl;
// Clean up
- hr->requestStopThread(NULL);
+ hr->requestStopThread(LLCore::HttpHandler::ptr_t());
ms_sleep(1000);
opt.reset();
delete hr;
@@ -435,6 +435,11 @@ WorkingSet::~WorkingSet()
{
}
+namespace
+{
+ void NoOpDeletor(LLCore::HttpHandler *)
+ { /*NoOp*/ }
+}
bool WorkingSet::reload(LLCore::HttpRequest * hr, LLCore::HttpOptions::ptr_t & opt)
{
@@ -464,11 +469,11 @@ bool WorkingSet::reload(LLCore::HttpRequest * hr, LLCore::HttpOptions::ptr_t & o
LLCore::HttpHandle handle;
if (offset || length)
{
- handle = hr->requestGetByteRange(0, 0, buffer, offset, length, opt, mHeaders, this);
+ handle = hr->requestGetByteRange(0, 0, buffer, offset, length, opt, mHeaders, LLCore::HttpHandler::ptr_t(this, NoOpDeletor));
}
else
{
- handle = hr->requestGet(0, 0, buffer, opt, mHeaders, this);
+ handle = hr->requestGet(0, 0, buffer, opt, mHeaders, LLCore::HttpHandler::ptr_t(this, NoOpDeletor));
}
if (! handle)
{
diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp
index 5662334555..8c276c0fe9 100755
--- a/indra/newview/llappcorehttp.cpp
+++ b/indra/newview/llappcorehttp.cpp
@@ -280,10 +280,16 @@ void setting_changed()
namespace
{
+ // The NoOpDeletor is used when wrapping LLAppCoreHttp in a smart pointer below for
+ // passage into the LLCore::Http libararies. When the smart pointer is destroyed,
+ // no action will be taken since we do not in this case want the entire LLAppCoreHttp object
+ // to be destroyed at the end of the call.
+ //
+ // *NOTE$: Yes! It is "Deletor"
+ // http://english.stackexchange.com/questions/4733/what-s-the-rule-for-adding-er-vs-or-when-nouning-a-verb
+ // "delete" derives from Latin "deletus"
void NoOpDeletor(LLCore::HttpHandler *)
- {
-
- }
+ { /*NoOp*/ }
}
void LLAppCoreHttp::requestStop()
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 71f7f7394f..e42367ad9e 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -393,10 +393,17 @@ U32 LLMeshRepository::sMaxLockHoldoffs = 0;
LLDeadmanTimer LLMeshRepository::sQuiescentTimer(15.0, false); // true -> gather cpu metrics
namespace {
- void NoOpDeletor(LLCore::HttpHandler *)
- {
+ // The NoOpDeletor is used when passing certain objects (generally the LLMeshUploadThread)
+ // in a smart pointer below for passage into the LLCore::Http libararies.
+ // When the smart pointer is destroyed, no action will be taken since we
+ // do not in these cases want the object to be destroyed at the end of the call.
+ //
+ // *NOTE$: Yes! It is "Deletor"
+ // http://english.stackexchange.com/questions/4733/what-s-the-rule-for-adding-er-vs-or-when-nouning-a-verb
+ // "delete" derives from Latin "deletus"
- }
+ void NoOpDeletor(LLCore::HttpHandler *)
+ { /*NoOp*/ }
}
static S32 dump_num = 0;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index d509f3e7c7..1f966dc76f 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -256,9 +256,17 @@ static const S32 HTTP_REQUESTS_RANGE_END_MAX = 20000000;
//////////////////////////////////////////////////////////////////////////////
namespace
{
+ // The NoOpDeletor is used when passing certain objects (the LLTextureFetchWorker and
+ // the LLTextureFetchDebugger) in a smart pointer below for passage into
+ // the LLCore::Http libararies. When the smart pointer is destroyed, no
+ // action will be taken since we do not in these cases want the object to
+ // be destroyed at the end of the call.
+ //
+ // *NOTE$: Yes! It is "Deletor"
+ // http://english.stackexchange.com/questions/4733/what-s-the-rule-for-adding-er-vs-or-when-nouning-a-verb
+ // "delete" derives from Latin "deletus"
void NoOpDeletor(LLCore::HttpHandler *)
- {
- }
+ { /*NoOp*/ }
}
static const char* e_state_name[] =