diff options
Diffstat (limited to 'indra/llmessage')
| -rw-r--r-- | indra/llmessage/llcoproceduremanager.cpp | 7 | ||||
| -rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 10 | 
2 files changed, 15 insertions, 2 deletions
| diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 263670bdac..6a663a8e97 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -301,12 +301,12 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):      mPoolSize(size),      mActiveCoprocsCount(0),      mPending(0), -    mPendingCoprocs(std::make_shared<CoprocQueue_t>(LLCoprocedureManager::DEFAULT_QUEUE_SIZE)),      mHTTPPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),      mCoroMapping()  {      try      { +        mPendingCoprocs = std::make_shared<CoprocQueue_t>(LLCoprocedureManager::DEFAULT_QUEUE_SIZE);          // store in our LLTempBoundListener so that when the LLCoprocedurePool is          // destroyed, we implicitly disconnect from this LLEventPump          // Monitores application status @@ -339,6 +339,11 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):          llassert(0); // Fix Me! Ignoring missing listener!      } +    catch (std::bad_alloc&) +    { +        LLError::LLUserWarningMsg::showOutOfMemory(); +        LL_ERRS("CoProcMgr") << "Bad memory allocation in LLCoprocedurePool::LLCoprocedurePool!" << LL_ENDL; +    }      for (size_t count = 0; count < mPoolSize; ++count)      { diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 918a69be6f..992e145758 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -295,7 +295,15 @@ void HttpCoroHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespons      }      else      { -        result = this->handleSuccess(response, status); +        try +        { +            result = this->handleSuccess(response, status); +        } +        catch (std::bad_alloc&) +        { +            LLError::LLUserWarningMsg::showOutOfMemory(); +            LL_ERRS("CoreHTTP") << "Failed to allocate memory for response handling." << LL_ENDL; +        }      }      buildStatusEntry(response, status, result); | 
