Some minor cleanups while hunting crashes. Reviewed by Kelly
parent
c537b63936
commit
6742d90d39
|
|
@ -44,6 +44,7 @@ void LLCommon::initClass()
|
|||
}
|
||||
LLTimer::initClass();
|
||||
LLThreadSafeRefCount::initThreadSafeRefCount();
|
||||
assert_main_thread(); // Make sure we record the main thread
|
||||
// LLWorkerThread::initClass();
|
||||
// LLFrameCallbackManager::initClass();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ protected:
|
|||
};
|
||||
};
|
||||
|
||||
LL_COMMON_API void assert_main_thread();
|
||||
|
||||
/// This mix-in class adds support for tracking all instances of the specified class parameter T
|
||||
/// The (optional) key associates a value of type KEY with a given instance of T, for quick lookup
|
||||
/// If KEY is not provided, then instances are stored in a simple set
|
||||
|
|
@ -116,7 +118,11 @@ class LLInstanceTracker : public LLInstanceTrackerBase
|
|||
InstanceMap sMap;
|
||||
};
|
||||
static StaticData& getStatic() { return LLInstanceTrackerBase::getStatic<StaticData, MyT, T, TRACKED>(); }
|
||||
static InstanceMap& getMap_() { return getStatic().sMap; }
|
||||
static InstanceMap& getMap_()
|
||||
{
|
||||
// assert_main_thread(); fwiw this class is not thread safe, and it used by multiple threads. Bad things happen.
|
||||
return getStatic().sMap;
|
||||
}
|
||||
|
||||
public:
|
||||
class instance_iter : public boost::iterator_facade<instance_iter, T, boost::forward_traversal_tag>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ LL_COMMON_API void assert_main_thread()
|
|||
static U32 s_thread_id = LLThread::currentID();
|
||||
if (LLThread::currentID() != s_thread_id)
|
||||
{
|
||||
llerrs << "Illegal execution outside main thread." << llendl;
|
||||
llwarns << "Illegal execution from thread id " << (S32) LLThread::currentID()
|
||||
<< " outside main thread " << (S32) s_thread_id << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,4 +311,6 @@ public:
|
|||
|
||||
//============================================================================
|
||||
|
||||
extern LL_COMMON_API void assert_main_thread();
|
||||
|
||||
#endif // LL_LLTHREAD_H
|
||||
|
|
|
|||
|
|
@ -294,6 +294,9 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons
|
|||
|
||||
void LLVolumeImplFlexible::updateRenderRes()
|
||||
{
|
||||
if (!mAttributes)
|
||||
return;
|
||||
|
||||
LLDrawable* drawablep = mVO->mDrawable;
|
||||
|
||||
S32 new_res = mAttributes->getSimulateLOD();
|
||||
|
|
@ -435,7 +438,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
|
|||
}
|
||||
}
|
||||
|
||||
if(!mInitialized)
|
||||
if(!mInitialized || !mAttributes)
|
||||
{
|
||||
//the object is not visible
|
||||
return ;
|
||||
|
|
|
|||
|
|
@ -112,14 +112,6 @@ class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate
|
|||
protected:
|
||||
~LLViewerObject(); // use unref()
|
||||
|
||||
// TomY: Provide for a list of extra parameter structures, mapped by structure name
|
||||
struct ExtraParameter
|
||||
{
|
||||
BOOL in_use;
|
||||
LLNetworkData *data;
|
||||
};
|
||||
std::map<U16, ExtraParameter*> mExtraParameterList;
|
||||
|
||||
public:
|
||||
typedef std::list<LLPointer<LLViewerObject> > child_list_t;
|
||||
typedef std::list<LLPointer<LLViewerObject> > vobj_list_t;
|
||||
|
|
@ -545,6 +537,8 @@ public:
|
|||
std::vector<LLVector3> mUnselectedChildrenPositions ;
|
||||
|
||||
private:
|
||||
// TomY: Provide for a list of extra parameter structures, mapped by structure name
|
||||
struct ExtraParameter;
|
||||
ExtraParameter* createNewParameterEntry(U16 param_type);
|
||||
ExtraParameter* getExtraParameterEntry(U16 param_type) const;
|
||||
ExtraParameter* getExtraParameterEntryCreate(U16 param_type);
|
||||
|
|
@ -782,6 +776,14 @@ private:
|
|||
LLUUID mAttachmentItemID; // ItemID of the associated object is in user inventory.
|
||||
EObjectUpdateType mLastUpdateType;
|
||||
BOOL mLastUpdateCached;
|
||||
|
||||
// TomY: Provide for a list of extra parameter structures, mapped by structure name
|
||||
struct ExtraParameter
|
||||
{
|
||||
BOOL in_use;
|
||||
LLNetworkData *data;
|
||||
};
|
||||
std::map<U16, ExtraParameter*> mExtraParameterList;
|
||||
};
|
||||
|
||||
///////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue