tens of thousands of references in message-manager-suspect for multiple messages
Categories
(Firefox :: Tabbed Browser, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: froydnj, Assigned: Felipe)
References
Details
(Whiteboard: [MemShrink:P2][fxperf:p3])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Reporter | ||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Updated•6 years ago
|
Reporter | ||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Reporter | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Regardless of the double counting, adding the listener and never removing it in this case seems clearly incorrect, and we should fix it. It's different from the other examples brought up (e.g. DOMTitleChanged) because the listener is added only once on those cases, and the listener object is the <browser> element itself, so they all go away together.
The getInPermitUnload function appears to be called on every tab switch, so that explains why usage will ramp up.. But it doesn't explain why others can't reproduce the issue (I just tried too). It could be that something else is leaking browsers and then you're seeing this count for every tab that ever existed in your current session.. Could be some add-on or other non-standard pref behavior. Do you have the pref dom.disable_beforeunload set to true?
Reporter | ||
Comment 11•6 years ago
|
||
I do not have dom.disable_beforeunload set. I will twiddle some of the addons I have (Email Tabs, In-Page Pop-up Reporter, and the Gecko Profiler) and see if that makes a difference.
Comment 12•6 years ago
|
||
I have zero expertise with how the message manager works so I can't say one way or the other if double counting is occurring.
Comment 13•6 years ago
|
||
Nathan can you split off the double-counting issue and we can use this bug for the 'not removing a listener' part?
Comment 14•6 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #11)
I do not have dom.disable_beforeunload set. I will twiddle some of the addons I have (Email Tabs, In-Page Pop-up Reporter, and the Gecko Profiler) and see if that makes a difference.
Did fiddling with your add-ons make any difference here?
Reporter | ||
Comment 15•6 years ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #14)
(In reply to Nathan Froyd [:froydnj] from comment #11)
I do not have dom.disable_beforeunload set. I will twiddle some of the addons I have (Email Tabs, In-Page Pop-up Reporter, and the Gecko Profiler) and see if that makes a difference.
Did fiddling with your add-ons make any difference here?
Disabling the in-page pop-up reporter appears to make this problem go away. \o/
Comment 16•6 years ago
|
||
Alrighty, moving to the WebExtension component for now then, as this is probably something we should try to prevent within the WebExtension APIs.
Here's the source code for the WebExtension in question: https://github.com/ehsan/popup-reporter
Updated•6 years ago
|
Comment 17•6 years ago
|
||
I can't see any reason this would be related to that extension. It looks pretty trivial, and doesn't really do anything that looks relevant.
The getInPermitUnload
function is definitely buggy, though, and is clearly the cause of this problem, and will clearly cause it with or without extensions.
Comment 18•6 years ago
|
||
Also, can I mention how much I hate that we have so much code uses buggy ad-hoc strategies for sending messages that need responses like this?
Updated•6 years ago
|
Assignee | ||
Comment 19•6 years ago
|
||
Assignee | ||
Comment 20•6 years ago
|
||
I'm fixing the obvious flaw here and will file a separate bug to improve the InPermitUnload handling so that it shouldn't require a round-trip message for this.
I'll leave following up on the possible double-counting of listeners up to Nathan.
Comment 21•6 years ago
|
||
Comment 22•6 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•