Closed Bug 329169 Opened 19 years ago Closed 19 years ago

Leak the livemark service occasionally during a shutdown if a load is in process

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 2 alpha1

People

(Reporter: bugs, Assigned: bugs)

Details

(Keywords: memory-leak)

Attachments

(1 file, 1 obsolete file)

If a livemark is being loaded during the shutdown of the browser, the channel for the load owns the bookmarks feed handler which owns the livemark service (using a curious manual addref - instead of a comptr!) which causes the livemark service's dtor not to fire... and the livemark service, annotation service, etc to leak. We need to cancel pending loads and timers in xpcom-shutdown.
Attached patch patch (obsolete) — Splinter Review
stop all loads/timers in xpcom-shutdown, instead of destructor, in case someone still owns a reference to us at shutdown
Attachment #213853 - Flags: review?(bryner)
hm this may not be the right thing. the loadgroup's dtor cancels active channels.
Comment on attachment 213853 [details] [diff] [review] patch >@@ -60,16 +62,19 @@ static NS_DEFINE_CID(kRDFServiceCID, > #define RSS09_NAMESPACE_URI "http://my.netscape.com/rdf/simple/0.9/" > #endif > #ifndef RSS10_NAMESPACE_URI > #define RSS10_NAMESPACE_URI "http://purl.org/rss/1.0/" > #endif > #ifndef DC_NAMESPACE_URI > #define DC_NAMESPACE_URI "http://purl.org/dc/elements/1.1/" > #endif >+ >+#define XPCOM_SHUTDOWN_TOPIC "xpcom-shutdown" you can #include "nsXPCOM.h" and this will be defined for you. >--- browser/components/places/src/nsLivemarkService.h 8 Feb 2006 21:07:59 -0000 1.6 >+++ browser/components/places/src/nsLivemarkService.h 3 Mar 2006 03:58:19 -0000 >-class nsLivemarkService : public nsILivemarkService >+class nsLivemarkService : public nsILivemarkService, nsIObserver make that "public nsIObserver" for consistency looks good otherwise
Attachment #213853 - Flags: review?(bryner) → review+
Attachment #213853 - Attachment is obsolete: true
ok let's see if this works.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Keywords: mlk
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h". In Thunderbird 3.0b, you do that as follows: Tools | Message Filters Make sure the correct account is selected. Click "New" Conditions: Body contains places-to-b-and-h Change the action to "Delete Message". Select "Manually Run" from the dropdown at the top. Click OK. Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter. Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: