summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llcoros.cpp22
-rw-r--r--indra/llcommon/llcoros.h3
2 files changed, 15 insertions, 10 deletions
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index a182d305e8..51cf2138cb 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -277,6 +277,9 @@ std::string LLCoros::launch(const std::string& prefix, const callable_t& callabl
return name;
}
+namespace
+{
+
#if LL_WINDOWS
static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific
@@ -295,7 +298,7 @@ U32 exception_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop)
}
}
-void LLCoros::winlevel(const callable_t& callable)
+void sehandle(const LLCoros::callable_t& callable)
{
__try
{
@@ -312,7 +315,16 @@ void LLCoros::winlevel(const callable_t& callable)
}
}
-#endif
+#else // ! LL_WINDOWS
+
+inline void sehandle(const LLCoros::callable_t& callable)
+{
+ callable();
+}
+
+#endif // ! LL_WINDOWS
+
+} // anonymous namespace
// Top-level wrapper around caller's coroutine callable.
// Normally we like to pass strings and such by const reference -- but in this
@@ -327,11 +339,7 @@ void LLCoros::toplevel(std::string name, callable_t callable)
// run the code the caller actually wants in the coroutine
try
{
-#if LL_WINDOWS && LL_RELEASE_FOR_DOWNLOAD
- winlevel(callable);
-#else
- callable();
-#endif
+ sehandle(callable);
}
catch (const Stop& exc)
{
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index 59b2b91f96..966ce03296 100644
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -309,9 +309,6 @@ private:
std::string generateDistinctName(const std::string& prefix) const;
void toplevel(std::string name, callable_t callable);
struct CoroData;
-#if LL_WINDOWS
- static void winlevel(const callable_t& callable);
-#endif
static CoroData& get_CoroData(const std::string& caller);
void saveException(const std::string& name, std::exception_ptr exc);