I found some old code hanging around in a tree, and figured out why I wrote it: currently the update service retains the observer service and in certain unusual circumstances leaks it. It is relatively simple to get the observer service when you need it instead of keeping a reference around.
Created attachment 212639 [details] [diff] [review] Don't cache observerservice, rev. 1
Comment on attachment 212639 [details] [diff] [review] Don't cache observerservice, rev. 1 >Index: toolkit/mozapps/update/src/nsUpdateService.js.in > case "xpcom-shutdown": >+ Components.utils.reportError("xpcomshutdown!"); >+ >+ os.removeObserver(this, "xpcom-shutdown"); Why is this case an error? I think this code would be slightly cleaner with a getObserverService global function that can be called from these places instead. r=darin w/ reportError removed or justified (please add a comment to the code in the latter case)
That error report was a debugging tool which I forgot to remove. Removed it, added a getObserverService() helper func, and FIXED on trunk and branch.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.