Closed Bug 42098 Opened 24 years ago Closed 24 years ago

Composer leaks nsEditorShell

Categories

(Core :: Layout, defect, P3)

All
Mac System 8.5
defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: sfraser_bugs, Assigned: anthonyd)

References

Details

(Keywords: memory-leak, perf, Whiteboard: [nsbeta3+][p:2][pdtp3])

Attachments

(2 files)

If you open and close a composer window (no typing required), we leak a bunch of 
stuff, including the nsEditor, nsEditorShell, nsEditorBoxObject, 2 nsJSContexts 
and perhaps more. This causes other teardown-related bugs (e.g. bug 41681).
Blocks: 41681
We're leaking an nsXULDocument here
*** Bug 41681 has been marked as a duplicate of this bug. ***
Status on this one:

If I remove the <editor> tag from the XUL, we stop leaking.
If I never make an editor in the C++, then we still leak.
Status: NEW → ASSIGNED
Target Milestone: --- → M17
Depends on: 42530
Well, this was fun. It turns out to be a bug deep in XBL/JS, which I've filed 
separately (bug 42746). I can fix this by checking in a workaround.
Whiteboard: fix in hand
I checked in a 1-line JS change that fixed the XUL doc leak. We still leak the 
editorshell, which is shown in the log just attached.
Summary: Composer leaks nsEditor, nsEditorShell, nsEditorBoxObject → Composer leaks nsEditorShell
Whiteboard: fix in hand
Tony, this one is all yours. FYI, here's an email which waterson sent out which 
relates to this bug:

David Baron has done a heroic job of tracking down and documenting a
plethora of leaks that involve XUL, JS, XBL, boxes, and editor. For
that, he certainly deserves a *ton* of credit. But that's not why I'm
writing this message.

I'm starting to get really, really nervous about the state of this code.
I think that a lot of stuff is just leaking all over the floor. And I
mean, really nasty, hard leaks that involve cycles between frames,
content nodes, and their JS objects. (For example, look at
http://bugzilla.mozilla.org/show_bug.cgi?id=45676.)

These leaks involve massive amounts of memory. For example, let's take
bug 45676. Just *using* a scrollbar (imagine that) entrains over 1Mb
(the entire window)! Realistically, this means that we're leaking almost
every window that we open.

I realize that people on XPToolkit are already doomed, but this stuff
has *got* to be made a priority. It has tremendous impact on performance
and footprint, and ultimately affects the stability of the product on
Win98, Mac, and embedded platforms.

Is there any hope that dbaron can get some help looking at this stuff?

thanks,
chris
Assignee: sfraser → anthonyd
Status: ASSIGNED → NEW
keywords
Keywords: nsbeta3, perf
Ugh, sorry for the spam. m18.
Target Milestone: M17 → M18
Status: NEW → ASSIGNED
Anthony -- pull in SImon if you need help with this one, setting to nsbeta3+
Whiteboard: nsbeta3+
setting priority in status whiteboard - medium
Whiteboard: nsbeta3+ → [nsbeta3+][p:3]
moving this over to m19 with other perf issues
Whiteboard: [nsbeta3+][p:3] → [nsbeta3-][p:3]
Target Milestone: M18 → M19
bumping up to p2, setting to nsbeta3+ -- reviewed by Bijal and beppe
Severity: normal → major
Priority: P3 → P2
Whiteboard: [nsbeta3-][p:3] → [nsbeta3+][p:2]
pdtp3.  There is nothing in this bug that describes the horrible impact of not
fixing it.  If you can show that fixing this would provide some huge benefit,
please bring it back for reconsideration.
Priority: P2 → P3
Whiteboard: [nsbeta3+][p:2] → [nsbeta3+][p:2][pdtp3]
Target Milestone: M19 → Future
This bug is fixed anyway.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Marking verified per last comments by reporter.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: