FIRE-19481; Try to not let any exception cross coroutine boundaries.
parent
694a148a9b
commit
478c457981
|
|
@ -234,8 +234,16 @@ void LLCoros::toplevel(coro::self& self, CoroData* data, const callable_t& calla
|
|||
{
|
||||
// capture the 'self' param in CoroData
|
||||
data->mSelf = &self;
|
||||
|
||||
// <FS:ND> FIRE-19481; do not let any exception propagate
|
||||
// callable();
|
||||
|
||||
try {
|
||||
// run the code the caller actually wants in the coroutine
|
||||
callable();
|
||||
} catch( ... ){ LL_WARNS() << "Exception during coroutine" << LL_ENDL; }
|
||||
// </FS:ND>
|
||||
|
||||
// This cleanup isn't perfectly symmetrical with the way we initially set
|
||||
// data->mPrev, but this is our last chance to reset mCurrentCoro.
|
||||
sCurrentCoro.reset(data->mPrev);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include <cctype>
|
||||
// external library headers
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/dcoroutine/exception.hpp> // for abnormal_exit
|
||||
#if LL_WINDOWS
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4701) // compiler thinks might use uninitialized var, but no
|
||||
|
|
@ -512,7 +513,15 @@ bool LLEventStream::post(const LLSD& event)
|
|||
// Let caller know if any one listener handled the event. This is mostly
|
||||
// useful when using LLEventStream as a listener for an upstream
|
||||
// LLEventPump.
|
||||
|
||||
// <FS:ND> FIRE-19481; do not let any abnormal_exit propagate
|
||||
// return (*signal)(event);
|
||||
|
||||
try {
|
||||
return (*signal)(event);
|
||||
}catch( boost::dcoroutines::abnormal_exit& )
|
||||
{ return false; }
|
||||
// </FS:ND>
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
|
|||
Loading…
Reference in New Issue