nsTouchBar keeps nsITouchBarInputCallbacks alive for too long
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
This appears to be the leak being seen in 1525411. nsTouchBar has a dictionary containing TouchBarInput, which in turn has a field with type nsITouchBarInputCallback. This is implemented in JS. The touch bar isn't torn down until after XPConnect shutdown, or something like that, so we end up leaking nsXPCWrappedJS and a few other things on developer machines that have touch bars.
This is basically a variant of bug 1523944, and adding a loop to releaseJSObjects that sets the callbacks to null seems to fix the leak.
Comment 1•5 years ago
|
||
Could be due to bug 1529366 ?
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
(In reply to Tim Nguyen :ntim from comment #1)
Could be due to bug 1529366 ?
I did look at that code, but I think the issue dates to the initial touchbar support in bug 1313429.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
I investigated this leak by adding code like this to the XPCWJS ctor and similar code to the dtor:
printf("XPCWJS CREATE %d %p %s\n", getpid(), this, aInfo->Name());
Then I triggered the leak, grepped for this logging in the leaking process, and wrote a little log analyzer to figure out that the leaked items were nsITouchBarInputCallback. Then I audited the uses of this class, and found the use in the touchbar class, which was similar to bug 1523944.
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/83e7324dc00b Release nsITouchBarInputCallback earlier so it doesn't leak. r=spohl
Comment 6•5 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•