Closed Bug 328104 Opened 19 years ago Closed 19 years ago

Don't entrain observer service in update service

Categories

(Toolkit :: Application Update, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8.1alpha2

People

(Reporter: benjamin, Assigned: benjamin)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

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.
Attachment #212639 - Flags: review?(darin)
Attachment #212639 - Flags: approval-branch-1.8.1?(darin)
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)
Attachment #212639 - Flags: review?(darin)
Attachment #212639 - Flags: review+
Attachment #212639 - Flags: approval-branch-1.8.1?(darin)
Attachment #212639 - Flags: approval-branch-1.8.1+
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
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: