Closed
Bug 328104
Opened 19 years ago
Closed 19 years ago
Don't entrain observer service in update service
Categories
(Toolkit :: Application Update, defect)
Toolkit
Application Update
Tracking
()
RESOLVED
FIXED
mozilla1.8.1alpha2
People
(Reporter: benjamin, Assigned: benjamin)
Details
(Keywords: fixed1.8.1)
Attachments
(1 file)
5.12 KB,
patch
|
darin.moz
:
review+
darin.moz
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #212639 -
Flags: review?(darin)
Attachment #212639 -
Flags: approval-branch-1.8.1?(darin)
Comment 2•19 years ago
|
||
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+
Assignee | ||
Comment 3•19 years ago
|
||
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.
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•