Closed
Bug 170022
Opened 22 years ago
Closed 22 years ago
leaks of Observer service through cycles
Categories
(SeaMonkey :: UI Design, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: dbaron, Assigned: dbaron)
Details
(Keywords: memory-leak, Whiteboard: [patch])
Attachments
(2 files, 2 obsolete files)
4.87 KB,
patch
|
Details | Diff | Splinter Review | |
4.00 KB,
patch
|
morse
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
In my build I'm seeing some leaks of the observer service and some corresponding
XPConnect wrappers (going both ways) through cycles where observers implemented
in JS have some path to the observer service (which prevents the observer
service's wrapper from being GCed), and the observer service then in turn owns
the observers (through an nsSupportsArray).
I'm not sure why these leaks don't show up on tinderbox. There were two GC
paths I fixed:
08370748 object 0x83a9c40 XPCWrappedNative_NoHelper via
nsXPCWrappedJS::mJSObj(Function).__parent__(ChromeWindow).observerService(XPCWrappedNative_NoHelper).
I fixed with the changes to cookieTasksOverlay.xul
086b4958 object 0x86c3970 XPCWrappedNative_NoHelper via
nsXPCWrappedJS::mJSObj(Object).observe(Function).__parent__(Call).service(XPCWrappedNative_NoHelper).
I fixed with changes to navigator.js
There are a bunch of other places that look suspicious but that probably didn't
get executed:
http://lxr.mozilla.org/seamonkey/source/extensions/cookie/resources/content/cookieTasksOverlay.xul#100
http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/content/pref-charset.xul#37
http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/content/pref-languages.xul#35
http://lxr.mozilla.org/seamonkey/source/mailnews/base/prefs/resources/content/pref-viewing_messages.xul#15
http://lxr.mozilla.org/seamonkey/source/mailnews/base/resources/content/folderProps.xul#41
http://lxr.mozilla.org/seamonkey/source/mailnews/compose/prefs/resources/content/pref-composing_messages.xul#14
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Comment 2•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Keywords: mlk
Priority: -- → P3
Whiteboard: [patch]
Target Milestone: --- → Future
Assignee | ||
Comment 3•22 years ago
|
||
Brendan pointed out that an alternative (and preferred) solution for the closure
cycle is to either null out the service variable or not use a variable at all
(since it's only used once).
Comment 4•22 years ago
|
||
... so service would have to be changed from const to var if it were kept.
The cookie patch looks like it just avoids unnecessary global variables, which
can entrain lots of garbage too.
/be
Assignee | ||
Comment 5•22 years ago
|
||
Attachment #100072 -
Attachment is obsolete: true
Assignee | ||
Comment 6•22 years ago
|
||
Attachment #100073 -
Attachment is obsolete: true
Comment 7•22 years ago
|
||
Comment on attachment 102721 [details] [diff] [review]
revised patch (diff -uw)
r=morse
Attachment #102721 -
Flags: review+
Comment 8•22 years ago
|
||
Comment on attachment 102721 [details] [diff] [review]
revised patch (diff -uw)
sr=jag
Attachment #102721 -
Flags: superreview+
Assignee | ||
Comment 9•22 years ago
|
||
Fix checked in to trunk, 2002-11-06 04:54/55 PDT.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•