Bug 1010634, Part 5: Add private destructor to NSSErrorService in line with the XPCOM recommendations, r=cviecco

--HG--
extra : rebase_source : 1f8b4558114eef0e1a15f51f0c814f16e05f6f76
This commit is contained in:
Brian Smith 2014-05-29 20:18:17 -07:00
parent dc9d61d222
commit 9eeeb8204b
2 changed files with 11 additions and 0 deletions

View File

@ -44,6 +44,8 @@ IsPSMError(PRErrorCode error)
NS_IMPL_ISUPPORTS(NSSErrorsService, nsINSSErrorsService)
NSSErrorsService::~NSSErrorsService() { }
nsresult
NSSErrorsService::Init()
{

View File

@ -30,6 +30,15 @@ public:
nsresult Init();
private:
// For XPCOM implementations that are not a base class for some other
// class, it is good practice to make the destructor non-virtual and
// private. Then the only way to delete the object is via Release.
#ifdef _MSC_VER
// C4265: Class has virtual members but destructor is not virtual
__pragma(warning(disable:4265))
#endif
~NSSErrorsService();
nsCOMPtr<nsIStringBundle> mPIPNSSBundle;
nsCOMPtr<nsIStringBundle> mNSSErrorsBundle;
};