diff options
| author | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2014-02-05 20:45:09 +0200 | 
|---|---|---|
| committer | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2014-02-05 20:45:09 +0200 | 
| commit | 1033c9d67f6bf3fd317bc2e6a6990e2b7e5d80c8 (patch) | |
| tree | 21b7fe3491804d6acd521bb3cdc6c1ec65a1ee44 | |
| parent | 52ce788d0cf77361dc337edaf136f401acd0d4a9 (diff) | |
MAINT-3555 crash in LLPanel::~LLPanel() on shutdown:
 - memory leaks fixing;
45 files changed, 94 insertions, 95 deletions
| diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 853f279c95..925fca1b4b 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -207,6 +207,10 @@ namespace {  #endif  } +namespace LLError +{ +	void clean(); +}  namespace  { @@ -352,7 +356,11 @@ namespace  		Globals()  			:	messageStreamInUse(false)  			{ } -		 + +		~Globals() +		{ +			LLError::clean(); +		}  	};  	void Globals::addCallSite(LLError::CallSite& site) @@ -380,8 +388,9 @@ namespace  		   is.  		   See C++ FAQ Lite, sections 10.12 through 10.14  		*/ -		static Globals* globals = new Globals;		 -		return *globals; + +		static Globals globals; +		return globals;  	}  } @@ -415,6 +424,7 @@ namespace LLError  		static void reset();  		static Settings* saveAndReset();  		static void restore(Settings*); +		static void clean();  	private:  		Settings() @@ -446,6 +456,15 @@ namespace LLError  		}  		return *p;  	} + +	void Settings::clean() +	{ +		Globals::get().invalidateCallSites(); + +		Settings*& p = getPtr(); +		delete p; +		p = NULL; +	}  	void Settings::reset()  	{ @@ -480,10 +499,7 @@ namespace LLError  		static Settings* currentSettings = NULL;  		return currentSettings;  	} -} -namespace LLError -{  	CallSite::CallSite(ELevel level,  					const char* file,  					int line, @@ -721,11 +737,7 @@ namespace LLError  			setLevels(s.tagLevelMap,		entry["tags"],		level);  		}  	} -} - -namespace LLError -{  	Recorder::~Recorder()  		{ } @@ -756,18 +768,26 @@ namespace LLError  			std::remove(s.recorders.begin(), s.recorders.end(), recorder),  			s.recorders.end());  	} -} -namespace LLError -{ +	void deleteRecorder(LLError::Settings& settings) +	{ +		removeRecorder(settings.fileRecorder); +		delete settings.fileRecorder; +		settings.fileRecorder = NULL; +		settings.fileRecorderFileName.clear(); +	} + +	void clean() +	{ +		deleteRecorder(LLError::Settings::get()); +		LLError::Settings::clean(); +	} +  	void logToFile(const std::string& file_name)  	{  		LLError::Settings& s = LLError::Settings::get(); -		removeRecorder(s.fileRecorder); -		delete s.fileRecorder; -		s.fileRecorder = NULL; -		s.fileRecorderFileName.clear(); +		deleteRecorder(s);  		if (file_name.empty())  		{ @@ -839,8 +859,6 @@ namespace  			}  		}  	} -} -  /*  Recorder formats: @@ -870,7 +888,6 @@ You get:  */ -namespace {  	bool checkLevelMap(const LevelMap& map, const std::string& key,  						LLError::ELevel& level)  	{ @@ -1127,13 +1144,7 @@ namespace LLError  			s.crashFunction(message);  		}  	} -} - - - -namespace LLError -{  	Settings* saveAndResetSettings()  	{  		return Settings::saveAndReset(); @@ -1226,10 +1237,7 @@ namespace LLError  		return chars ? time_str : "time error";  	} -} - -namespace LLError -{      +       	char** LLCallStacks::sBuffer = NULL ;  	S32    LLCallStacks::sIndex  = 0 ; diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index fb2d43e3b0..aa66ceb4ec 100755 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -44,7 +44,7 @@  #include "llsdserialize.h"  #include "llproxy.h" -LLPumpIO* gServicePump; +LLPumpIO* gServicePump = NULL;  BOOL gBreak = false;  BOOL gSent = false; @@ -80,7 +80,8 @@ LLCrashLogger::LLCrashLogger() :  LLCrashLogger::~LLCrashLogger()  { - +	delete gServicePump; +	gServicePump = NULL;  }  // TRIM_SIZE must remain larger than LINE_SEARCH_SIZE. diff --git a/indra/llmessage/llhttpsender.cpp b/indra/llmessage/llhttpsender.cpp index c48cbc42a6..d0bd343db6 100755 --- a/indra/llmessage/llhttpsender.cpp +++ b/indra/llmessage/llhttpsender.cpp @@ -38,7 +38,7 @@ namespace  {  	typedef std::map<LLHost, LLHTTPSender*> SenderMap;  	static SenderMap senderMap; -	static LLHTTPSender* defaultSender = new LLHTTPSender(); +	static LLPointer<LLHTTPSender> defaultSender(new LLHTTPSender());  }  //virtual  @@ -90,6 +90,5 @@ void LLHTTPSender::clearSender(const LLHost& host)  //static   void LLHTTPSender::setDefaultSender(LLHTTPSender* sender)  { -	delete defaultSender;  	defaultSender = sender;  } diff --git a/indra/llmessage/llhttpsender.h b/indra/llmessage/llhttpsender.h index 88920db24d..ff8fa2f95b 100755 --- a/indra/llmessage/llhttpsender.h +++ b/indra/llmessage/llhttpsender.h @@ -32,7 +32,7 @@  class LLHost;  class LLSD; -class LLHTTPSender +class LLHTTPSender : public LLThreadSafeRefCount  {   public: diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index e63b41f97c..17b9b91ba7 100755 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -330,17 +330,16 @@ private:  // local static instance for registering a particular panel class  template<typename T> -class LLRegisterPanelClassWrapper -:	public LLRegisterPanelClass +	class LLPanelInjector  {  public: -	// reigister with either the provided builder, or the generic templated builder -	LLRegisterPanelClassWrapper(const std::string& tag); +	// register with either the provided builder, or the generic templated builder +	LLPanelInjector(const std::string& tag);  };  template<typename T> -LLRegisterPanelClassWrapper<T>::LLRegisterPanelClassWrapper(const std::string& tag)  +	LLPanelInjector<T>::LLPanelInjector(const std::string& tag)   {  	LLRegisterPanelClass::instance().addPanelClass(tag,&LLRegisterPanelClass::defaultPanelClassBuilder<T>);  } diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 80a80f4298..2764025d75 100755 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -200,14 +200,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,                       LPSTR     lpCmdLine,                       int       nCmdShow)  { -#ifdef INCLUDE_VLD -	// only works for debug builds (hard coded into vld.h) -	#ifdef _DEBUG -		// start with Visual Leak Detector turned off -		VLDGlobalDisable(); -	#endif // _DEBUG -#endif // INCLUDE_VLD -  	const S32 MAX_HEAPS = 255;  	DWORD heap_enable_lfh_error[MAX_HEAPS];  	S32 num_heaps = 0; diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index e86d6930e8..e200e0ee9e 100755 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -43,7 +43,7 @@  #include "llpaneloutfitedit.h"  #include "lltrans.h" -static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables"); +static LLPanelInjector<LLCOFWearables> t_cof_wearables("cof_wearables");  const LLSD REARRANGE = LLSD().with("rearrange", LLSD()); diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index c85d048c5a..d0939b3eee 100755 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -151,7 +151,7 @@ void LLPanelCameraItem::setValue(const LLSD& value)  	getChildView("selected_picture")->setVisible( value["selected"]);  } -static LLRegisterPanelClassWrapper<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel"); +static LLPanelInjector<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel");  //-------------------------------------------------------------------------------  // LLPanelCameraZoom diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index c339ee3beb..b50a2e6f85 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1823,7 +1823,7 @@ private:  	callback_t mCallback;  };  //---------------------------------------------------------------------------- -static LLRegisterPanelClassWrapper<LLPanelPreference> t_places("panel_preference"); +static LLPanelInjector<LLPanelPreference> t_places("panel_preference");  LLPanelPreference::LLPanelPreference()  : LLPanel(),    mBandWidthUpdater(NULL) @@ -2063,8 +2063,8 @@ private:  	std::list<std::string> mAccountIndependentSettings;  }; -static LLRegisterPanelClassWrapper<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics"); -static LLRegisterPanelClassWrapper<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy"); +static LLPanelInjector<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics"); +static LLPanelInjector<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy");  BOOL LLPanelPreferenceGraphics::postBuild()  { diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 2a74c8e3ea..9490769d8c 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -47,10 +47,10 @@  #include "llviewercontrol.h"  #include "llviewermedia.h" -static LLRegisterPanelClassWrapper<LLSocialStatusPanel> t_panel_status("llsocialstatuspanel"); -static LLRegisterPanelClassWrapper<LLSocialPhotoPanel> t_panel_photo("llsocialphotopanel"); -static LLRegisterPanelClassWrapper<LLSocialCheckinPanel> t_panel_checkin("llsocialcheckinpanel"); -static LLRegisterPanelClassWrapper<LLSocialAccountPanel> t_panel_account("llsocialaccountpanel"); +static LLPanelInjector<LLSocialStatusPanel> t_panel_status("llsocialstatuspanel"); +static LLPanelInjector<LLSocialPhotoPanel> t_panel_photo("llsocialphotopanel"); +static LLPanelInjector<LLSocialCheckinPanel> t_panel_checkin("llsocialcheckinpanel"); +static LLPanelInjector<LLSocialAccountPanel> t_panel_account("llsocialaccountpanel");  const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte  const std::string DEFAULT_CHECKIN_LOCATION_URL = "http://maps.secondlife.com/"; diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index c15b6bd0d3..ff8bfafb79 100755 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -343,7 +343,7 @@ private:  ////////////////////////////////////////////////////////////////////////// -static LLRegisterPanelClassWrapper<LLOutfitsList> t_outfits_list("outfits_list"); +static LLPanelInjector<LLOutfitsList> t_outfits_list("outfits_list");  LLOutfitsList::LLOutfitsList()  	:	LLPanelAppearanceTab() diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 115114bb53..9665314e75 100755 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -48,7 +48,7 @@  #include "llsidetraypanelcontainer.h"  #include "llviewercontrol.h" -static LLRegisterPanelClassWrapper<LLPanelBlockedList> t_panel_blocked_list("panel_block_list_sidetray"); +static LLPanelInjector<LLPanelBlockedList> t_panel_blocked_list("panel_block_list_sidetray");  //  // Constants diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index e71dba5cae..0621cc8fad 100755 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -62,7 +62,7 @@  #include "llappearancemgr.h"  // register panel with appropriate XML -static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable"); +static LLPanelInjector<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable");  // subparts of the UI for focus, camera position, etc.  enum ESubpart { diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index a0ca82da46..c872a15af7 100755 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -56,7 +56,7 @@  #include "lltrans.h" -static LLRegisterPanelClassWrapper<LLPanelGroup> t_panel_group("panel_group_info_sidetray"); +static LLPanelInjector<LLPanelGroup> t_panel_group("panel_group_info_sidetray"); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 68835ec5b8..eaf33c7108 100755 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -53,7 +53,7 @@  #include "lltrans.h"  #include "llviewerwindow.h" -static LLRegisterPanelClassWrapper<LLPanelGroupGeneral> t_panel_group_general("panel_group_general"); +static LLPanelInjector<LLPanelGroupGeneral> t_panel_group_general("panel_group_general");  // consts  const S32 MATURE_CONTENT = 1; diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index c927aeacb3..17707557bb 100755 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -55,7 +55,7 @@  #include "llfloaterworldmap.h"  #include "llviewermessage.h" -static LLRegisterPanelClassWrapper<LLPanelGroupLandMoney> t_panel_group_money("panel_group_land_money"); +static LLPanelInjector<LLPanelGroupLandMoney> t_panel_group_money("panel_group_land_money"); diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 522ba5afae..0dfb8fef53 100755 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -57,7 +57,7 @@  #include "llnotificationsutil.h"  #include "llgiveinventory.h" -static LLRegisterPanelClassWrapper<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices"); +static LLPanelInjector<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices");  ///////////////////////// diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index b89e7b8b73..c30c932c41 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -55,7 +55,7 @@  #include "roles_constants.h" -static LLRegisterPanelClassWrapper<LLPanelGroupRoles> t_panel_group_roles("panel_group_roles"); +static LLPanelInjector<LLPanelGroupRoles> t_panel_group_roles("panel_group_roles");  bool agentCanRemoveFromRole(const LLUUID& group_id,  							const LLUUID& role_id) @@ -733,7 +733,7 @@ void LLPanelGroupSubTab::setFooterEnabled(BOOL enable)  //////////////////////////// -static LLRegisterPanelClassWrapper<LLPanelGroupMembersSubTab> t_panel_group_members_subtab("panel_group_members_subtab"); +static LLPanelInjector<LLPanelGroupMembersSubTab> t_panel_group_members_subtab("panel_group_members_subtab");  LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()  : 	LLPanelGroupSubTab(), @@ -1755,7 +1755,7 @@ void LLPanelGroupMembersSubTab::updateMembers()  // LLPanelGroupRolesSubTab  //////////////////////////// -static LLRegisterPanelClassWrapper<LLPanelGroupRolesSubTab> t_panel_group_roles_subtab("panel_group_roles_subtab"); +static LLPanelInjector<LLPanelGroupRolesSubTab> t_panel_group_roles_subtab("panel_group_roles_subtab");  LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab()    : LLPanelGroupSubTab(), @@ -2469,7 +2469,7 @@ void LLPanelGroupRolesSubTab::saveRoleChanges(bool select_saved_role)  // LLPanelGroupActionsSubTab  //////////////////////////// -static LLRegisterPanelClassWrapper<LLPanelGroupActionsSubTab> t_panel_group_actions_subtab("panel_group_actions_subtab"); +static LLPanelInjector<LLPanelGroupActionsSubTab> t_panel_group_actions_subtab("panel_group_actions_subtab");  LLPanelGroupActionsSubTab::LLPanelGroupActionsSubTab() diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp index b03bab3127..ab0ccffae4 100755 --- a/indra/newview/llpanelhome.cpp +++ b/indra/newview/llpanelhome.cpp @@ -31,7 +31,7 @@  #include "llmediactrl.h"  #include "llviewerhome.h" -static LLRegisterPanelClassWrapper<LLPanelHome> t_home("panel_sidetray_home"); +static LLPanelInjector<LLPanelHome> t_home("panel_sidetray_home");  LLPanelHome::LLPanelHome() :  	LLPanel(), diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 5c9b968ac9..934f8ed8c7 100755 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -53,7 +53,7 @@ typedef std::pair<LLUUID, std::string> folder_pair_t;  static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right);  static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats); -static LLRegisterPanelClassWrapper<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info"); +static LLPanelInjector<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info");  // Statics for textures filenames  static std::string icon_pg; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index bd173fadc7..68c22c12fd 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -58,7 +58,7 @@  const std::string FILTERS_FILENAME("filters.xml"); -static LLRegisterPanelClassWrapper<LLPanelMainInventory> t_inventory("panel_main_inventory"); +static LLPanelInjector<LLPanelMainInventory> t_inventory("panel_main_inventory");  void on_file_loaded_for_save(BOOL success,   							 LLViewerFetchedTexture *src_vi, diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index dcecce6fe4..79e079f6bd 100755 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -38,7 +38,7 @@  #include "llviewercontrol.h" -static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox"); +static LLPanelInjector<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");  const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams()   {  diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index a9af56f750..7a408e736f 100755 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -48,7 +48,7 @@  #include "lltabcontainer.h"  #include "lltexturectrl.h" -static LLRegisterPanelClassWrapper<LLPanelMe> t_panel_me_profile("panel_me"); +static LLPanelInjector<LLPanelMe> t_panel_me_profile("panel_me");  LLPanelMe::LLPanelMe(void)    : LLPanelProfile() diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index c09d4393c8..f75d76da94 100755 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -74,7 +74,7 @@  #include "llwearabletype.h"  #include "llweb.h" -static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit"); +static LLPanelInjector<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit");  const U64 WEARABLE_MASK = (1LL << LLInventoryType::IT_WEARABLE);  const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LLInventoryType::IT_OBJECT); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index f90236f6f2..e0132d20fb 100755 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -46,7 +46,7 @@  static const std::string OUTFITS_TAB_NAME = "outfitslist_tab";  static const std::string COF_TAB_NAME = "cof_tab"; -static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory"); +static LLPanelInjector<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");  LLPanelOutfitsInventory::LLPanelOutfitsInventory() :  	mMyOutfitsPanel(NULL), diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index f551fc96ee..f5542ee7a6 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -216,7 +216,7 @@ static const LLAvatarItemStatusComparator STATUS_COMPARATOR;  static LLAvatarItemDistanceComparator DISTANCE_COMPARATOR;  static const LLAvatarItemRecentSpeakerComparator RECENT_SPEAKER_COMPARATOR; -static LLRegisterPanelClassWrapper<LLPanelPeople> t_people("panel_people"); +static LLPanelInjector<LLPanelPeople> t_people("panel_people");  //============================================================================= diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index cfbc8f1a94..f0617266db 100755 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -69,7 +69,7 @@ static const std::string CLASSIFIED_ID("classified_id");  static const std::string CLASSIFIED_NAME("classified_name"); -static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks("panel_picks"); +static LLPanelInjector<LLPanelPicks> t_panel_picks("panel_picks");  class LLPickHandler : public LLCommandHandler, diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 5d9971c16c..14b5d9af47 100755 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -53,7 +53,7 @@  #include "llviewerparcelmgr.h"  #include "llviewerregion.h" -static LLRegisterPanelClassWrapper<LLPanelPlaceProfile> t_place_profile("panel_place_profile"); +static LLPanelInjector<LLPanelPlaceProfile> t_place_profile("panel_place_profile");  // Statics for textures filenames  static std::string icon_pg; diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 8bb3ace2d9..499b9ab62e 100755 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -229,7 +229,7 @@ private:  }; -static LLRegisterPanelClassWrapper<LLPanelPlaces> t_places("panel_places"); +static LLPanelInjector<LLPanelPlaces> t_places("panel_places");  LLPanelPlaces::LLPanelPlaces()  	:	LLPanel(), diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 381c11348d..47e46a968f 100755 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -60,7 +60,7 @@ private:  	void onSend();  }; -static LLRegisterPanelClassWrapper<LLPanelSnapshotInventory> panel_class("llpanelsnapshotinventory"); +static LLPanelInjector<LLPanelSnapshotInventory> panel_class("llpanelsnapshotinventory");  LLPanelSnapshotInventory::LLPanelSnapshotInventory()  { diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index d153ff598d..43e38b95e2 100755 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -63,7 +63,7 @@ private:  	void onSaveFlyoutCommit(LLUICtrl* ctrl);  }; -static LLRegisterPanelClassWrapper<LLPanelSnapshotLocal> panel_class("llpanelsnapshotlocal"); +static LLPanelInjector<LLPanelSnapshotLocal> panel_class("llpanelsnapshotlocal");  LLPanelSnapshotLocal::LLPanelSnapshotLocal()  { diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 554fabe5b3..455c1c9e5f 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -56,7 +56,7 @@ private:  	void onSaveToComputer();  }; -static LLRegisterPanelClassWrapper<LLPanelSnapshotOptions> panel_class("llpanelsnapshotoptions"); +static LLPanelInjector<LLPanelSnapshotOptions> panel_class("llpanelsnapshotoptions");  LLPanelSnapshotOptions::LLPanelSnapshotOptions()  { diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index f2bb8f530b..aa109e9a51 100755 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -79,7 +79,7 @@ private:  	std::string mAgentEmail;  }; -static LLRegisterPanelClassWrapper<LLPanelSnapshotPostcard> panel_class("llpanelsnapshotpostcard"); +static LLPanelInjector<LLPanelSnapshotPostcard> panel_class("llpanelsnapshotpostcard");  LLPanelSnapshotPostcard::LLPanelSnapshotPostcard()  :	mHasFirstMsgFocus(false) diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp index a706318369..8949eb73eb 100755 --- a/indra/newview/llpanelsnapshotprofile.cpp +++ b/indra/newview/llpanelsnapshotprofile.cpp @@ -64,7 +64,7 @@ private:  	void onSend();  }; -static LLRegisterPanelClassWrapper<LLPanelSnapshotProfile> panel_class("llpanelsnapshotprofile"); +static LLPanelInjector<LLPanelSnapshotProfile> panel_class("llpanelsnapshotprofile");  LLPanelSnapshotProfile::LLPanelSnapshotProfile()  { diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index 6be2ea6481..6f0a1624a7 100755 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -40,7 +40,7 @@  #include "lluictrlfactory.h" -static LLRegisterPanelClassWrapper<LLPanelVoiceDeviceSettings> t_panel_group_general("panel_voice_device_settings"); +static LLPanelInjector<LLPanelVoiceDeviceSettings> t_panel_group_general("panel_voice_device_settings");  static const std::string DEFAULT_DEVICE("Default"); diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp index 5fec6d967d..7da553801a 100755 --- a/indra/newview/llpanelvoiceeffect.cpp +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -36,7 +36,7 @@  #include "lltransientfloatermgr.h"  #include "llvoiceclient.h" -static LLRegisterPanelClassWrapper<LLPanelVoiceEffect> t_panel_voice_effect("panel_voice_effect"); +static LLPanelInjector<LLPanelVoiceEffect> t_panel_voice_effect("panel_voice_effect");  LLPanelVoiceEffect::LLPanelVoiceEffect()  	: mVoiceEffectCombo(NULL) diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index aa3ed22bee..edb624e3aa 100755 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -151,7 +151,7 @@ protected:  std::string LLPanelAppearanceTab::sFilterSubString = LLStringUtil::null; -static LLRegisterPanelClassWrapper<LLPanelWearing> t_panel_wearing("panel_wearing"); +static LLPanelInjector<LLPanelWearing> t_panel_wearing("panel_wearing");  LLPanelWearing::LLPanelWearing()  	:	LLPanelAppearanceTab() diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 08829c1184..153f0930c2 100755 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -27,7 +27,7 @@  #include "llpopupview.h" -static LLRegisterPanelClassWrapper<LLPopupView> r("popup_holder"); +static LLPanelInjector<LLPopupView> r("popup_holder");  bool view_visible_and_enabled(LLView* viewp)  { diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 989f0b0e60..1257ee7f94 100755 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -59,7 +59,7 @@ S32 gStartImageWidth = 1;  S32 gStartImageHeight = 1;  const F32 FADE_TO_WORLD_TIME = 1.0f; -static LLRegisterPanelClassWrapper<LLProgressView> r("progress_view"); +static LLPanelInjector<LLProgressView> r("progress_view");  // XUI: Translate  LLProgressView::LLProgressView()  diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index df413ab849..ec6a1d9bdc 100755 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -49,7 +49,7 @@  #include "llvoavatarself.h"  #include "llviewerwearable.h" -static LLRegisterPanelClassWrapper<LLSidepanelAppearance> t_appearance("sidepanel_appearance"); +static LLPanelInjector<LLSidepanelAppearance> t_appearance("sidepanel_appearance");  class LLCurrentlyWornFetchObserver : public LLInventoryFetchItemsObserver  { diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index fe844ce5e4..1ce691f696 100755 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -59,7 +59,7 @@  #include "llviewernetwork.h"  #include "llweb.h" -static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_inventory"); +static LLPanelInjector<LLSidepanelInventory> t_inventory("sidepanel_inventory");  //  // Constants diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 92c2863ffd..e52b2f2559 100755 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -127,7 +127,7 @@ void LLObjectInventoryObserver::inventoryChanged(LLViewerObject* object,  /// Class LLSidepanelItemInfo  ///---------------------------------------------------------------------------- -static LLRegisterPanelClassWrapper<LLSidepanelItemInfo> t_item_info("sidepanel_item_info"); +static LLPanelInjector<LLSidepanelItemInfo> t_item_info("sidepanel_item_info");  // Default constructor  LLSidepanelItemInfo::LLSidepanelItemInfo(const LLPanel::Params& p) diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 9be6d0c5f1..4428098929 100755 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -71,7 +71,7 @@  LLSidepanelTaskInfo* LLSidepanelTaskInfo::sActivePanel = NULL; -static LLRegisterPanelClassWrapper<LLSidepanelTaskInfo> t_task_info("sidepanel_task_info"); +static LLPanelInjector<LLSidepanelTaskInfo> t_task_info("sidepanel_task_info");  // Default constructor  LLSidepanelTaskInfo::LLSidepanelTaskInfo() diff --git a/indra/newview/lltool.h b/indra/newview/lltool.h index ecc435d844..c5bad9d532 100755 --- a/indra/newview/lltool.h +++ b/indra/newview/lltool.h @@ -39,7 +39,7 @@ class LLView;  class LLPanel;  class LLTool -:	public LLMouseHandler +:	public LLMouseHandler, public LLThreadSafeRefCount  {  public:  	LLTool( const std::string& name, LLToolComposite* composite = NULL ); diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 5270c3d33f..b75d6b3dcb 100755 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -61,7 +61,7 @@ extern LLControlGroup gSavedSettings;  // we use this in various places instead of NULL -static LLTool* sNullTool = new LLTool(std::string("null"), NULL);  +static LLPointer<LLTool> sNullTool(new LLTool(std::string("null"), NULL));   //-----------------------------------------------------------------------  // LLToolComposite | 
