Closed
Bug 1262110
Opened 9 years ago
Closed 9 years ago
Release dock menu on shutdown
Categories
(Core :: Widget: Cocoa, defect)
Core
Widget: Cocoa
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: peterv, Assigned: peterv)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
My patch in bug 1251361 triggers a leak in bc tests on OS X, but it's probably an existing leak. I haven't been able to reproduce it locally, so I don't know what makes it show up. CC logs from Tinderbox show this is because the cocoa menu code (in particular the dock menu code) holds on to elements. I looked into hooking it up to the cycle collector, but it's lot of changes (touching non-cocoa widget code too).
Just making nsMacDockSupport (which is a service!) release the dock menu on shutdown fixes the leak too, and is a much smaller change. Let me know if you think I should make all the cocoa widget code CC'ed, or if I should file a followup for that. In theory widgets should all go away on shutdown, but I don't know how likely they are to be involved in cycles.
Attachment #8738104 -
Flags: review?(bugs)
Comment 1•9 years ago
|
||
Comment on attachment 8738104 [details] [diff] [review]
v1
Ok, nsMacDockSupport ("@mozilla.org/widget/macdocksupport;1") is a service and is kept alive until shutdown. So making it CCable wouldn't really help more than this.
I'd say the leak is FF UI leak, given that it doesn't ever clear dockMenu it sets.
We initialize it in
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#1550
Could we set it to null in http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#1586?
try {
let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
.getService(Ci.nsIMacDockSupport);
dockSupport.dockMenu = null;
} catch (e) {}
mDockMenu = do_QueryInterface(aDockMenu, &rv); in nsMacDockSupport::SetDockMenu is silly
since it always sets mDockMenu, yet may cause an exception to be thrown.
Comment 2•9 years ago
|
||
Comment 0 sounds related to bug 994371. You get an extra shutdown CC due to some Cocoa stuff holding onto elements. You could try that patch and see if it helps. I didn't bother landing it because I didn't feel like trying to fix all of the extra shutdown CCs.
Comment 3•9 years ago
|
||
Hmm, it sounds like I didn't get that patch fully working. But still, it is something to consider.
Comment 4•9 years ago
|
||
Comment on attachment 8738104 [details] [diff] [review]
v1
So I can live with this approach too, but I'd prefer fixing this in browser.js if possible.
Attachment #8738104 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Yeah, I pushed a fix in browser.js to try, but for some reason the tests didn't run yet.
Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8739040 -
Flags: review?(bugs)
Assignee | ||
Updated•9 years ago
|
Attachment #8738104 -
Attachment is obsolete: true
Updated•9 years ago
|
Attachment #8739040 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a5dd49a6ff85f4eece78994445ceacccb26e41a
Bug 1262110 - Null out nsIMacDockSupport.dockMenu on shutdown. r=smaug.
Comment 8•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Blocks: 1294933
You need to log in
before you can comment on or make changes to this bug.
Description
•