Start up crash of LLErrorThread due to corrupt map in CheckLevelMap

Wrapped gSettings and the global objects returned by Settings::get() and
Globals::get() in AIThreadSafe, forcing thread-safe access.

This solves the problem of possible corruption of the various LevelMap's
in LLError::Settings due to thread unsafe accesses.
This commit is contained in:
Aleric Inglewood
2011-05-05 15:41:19 +02:00
parent 86a19e8e91
commit 92696623e0
15 changed files with 261 additions and 215 deletions

View File

@@ -122,7 +122,7 @@ public:
const std::string& getComment() const { return mComment; }
eControlType type() { return mType; }
bool isType(eControlType tp) { return tp == mType; }
bool isType(eControlType tp) const { return tp == mType; }
void resetToDefault(bool fire_signal = false);
@@ -153,7 +153,8 @@ public:
bool isCOA() const { return mIsCOA; }
bool isCOAParent() const { return mIsCOAParent; }
LLControlVariable *getCOAConnection() const { return mCOAConnectedVar; }
LLControlVariable *getCOAActive();
LLControlVariable* getCOAActive();
LLControlVariable const* getCOAActive() const;
void setIsCOA(bool IsCOA) { mIsCOA=IsCOA; }
void setCOAConnect(LLControlVariable *pConnect, bool IsParent)
{
@@ -185,7 +186,8 @@ public:
~LLControlGroup();
void cleanup();
LLPointer<LLControlVariable> getControl(const std::string& name);
LLControlVariable* getControl(std::string const& name);
LLControlVariable const* getControl(std::string const& name) const;
struct ApplyFunctor
{
@@ -210,7 +212,7 @@ public:
std::string findString(const std::string& name);
std::string getString(const std::string& name);
std::string getString(const std::string& name) const;
LLWString getWString(const std::string& name);
std::string getText(const std::string& name);
LLVector3 getVector3(const std::string& name);
@@ -245,7 +247,7 @@ public:
void setValue(const std::string& name, const LLSD& val);
BOOL controlExists(const std::string& name);
BOOL controlExists(const std::string& name) const;
// Returns number of controls loaded, 0 if failed
// If require_declaration is false, will auto-declare controls it finds