bug=59530

sr=waterson
r=valeski
This fix removes the two instances of the unsafe practice of having
static nsCOMPtr instances, either as static data members or or file
static variables.  This practice prevents the proper ref-counting of
such instances, and leads to accessing the instances after their
ref-count has gone to 0.

The following files are in this fix:

widget/timer/src/windows/nsTimer.cpp
xpfe/components/bookmarks/src/nsBookmarksService.cpp
xpfe/components/bookmarks/src/nsBookmarksService.h
widget/timer/src/windows/nsWindowsTimer.h


git-svn-id: svn://10.0.0.236/trunk@235710 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org 2007-09-12 17:48:35 +00:00
parent 3c0f6e01fd
commit 9128c2cc56
2 changed files with 1 additions and 3 deletions

View File

@ -1582,8 +1582,6 @@ BookmarkParser::setFolderHint(nsIRDFResource *newSource, nsIRDFResource *objType
////////////////////////////////////////////////////////////////////////
// BookmarkDataSourceImpl
nsCOMPtr<nsITimer> nsBookmarksService::mTimer;
nsBookmarksService::nsBookmarksService()
: mInner(nsnull), mBookmarksAvailable(PR_FALSE), mDirty(PR_FALSE), mUpdateBatchNest(0)

View File

@ -58,7 +58,7 @@ protected:
nsCOMPtr<nsIStringBundle> mBundle;
nsString mPersonalToolbarName;
PRInt32 mUpdateBatchNest;
static nsCOMPtr<nsITimer> mTimer;
nsCOMPtr<nsITimer> mTimer;
#ifdef XP_MAC
PRBool mIEFavoritesAvailable;