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)
|
47 bytes,
text/x-phabricator-request
|
Details |
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•7 years ago
|
||
Could be due to bug 1529366 ?
| Assignee | ||
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 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•7 years ago
|
Updated•7 years ago
|
| Assignee | ||
Comment 4•7 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.
Comment 6•7 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Description
•