Closed
Bug 87466
Opened 23 years ago
Closed 23 years ago
Global object and focus stuff leaking via cycle, per window
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: dbaron, Assigned: dbaron)
Details
(Whiteboard: [PDT+])
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
A bunch of focus related stuff leaks per-window via a cycle that includes the
global object, and, if a key is pressed in that window, drags in an XBL document
for each window where a key is pressed (which is 30K of logged (via
nsTraceRefcnt) objects per window, probably a good bit more (50% more? 500%
more?) of unlogged objects). The following diagram explains what I'm seeing
(where |A| mFoo--> |B| represents A having a member mFoo that has an owning
pointer to B):
Another GlobalWindowImpl, in one case but not the others
^
|
mOpener mChromeEventHandler--
------------------ \ --------------
|GlobalWindowImpl| -> |nsWindowRoot|
------------------ --------------
^ -----mFocusController mListenerManager
/ / /
/ / /
/ / ------------------------ /
/ / |nsEventListenerManager| <--
mFocusedWindow v ------------------------
------------------- m???Listeners
|nsFocusController| / \
------------------- <--------- v
-----------------------
|nsXBLWindowKeyHandler|
-----------------------
|
|
(if a key is pressed)
|
v
-------------------
|nsXBLDocumentInfo|
-------------------
|
v
------------
|nsDocument|----> Content nodes
------------
Assignee | ||
Comment 1•23 years ago
|
||
This seems related to hyatt's fix for bug 54023. He changed:
nsIChromeEventHandler* mChromeEventHandler; // Weak Reference
to
nsCOMPtr<nsIChromeEventHandler> mChromeEventHandler; // [Strong] We break it
when we get torn down.
but I don't see any code to break the cycle when the global is torn down. Such
code would be easy to write, though....
Assignee | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
Well, the above patch works and it doesn't seem to do anything harmful after
about a minute of using the browser. Are there any problems that it could cause?
Assignee | ||
Updated•23 years ago
|
Comment 4•23 years ago
|
||
sr=hyatt
Comment 5•23 years ago
|
||
looks right to me, r=saari
Assignee | ||
Comment 6•23 years ago
|
||
Fix checked in 2001-06-26 14:29 PDT.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•23 years ago
|
||
Marking [PDT+] per conversation with chofmann.
Keywords: nsBranch
Whiteboard: [PDT+]
Assignee | ||
Comment 8•23 years ago
|
||
Fix checked into branch 2001-06-30 12:01 PDT.
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•