You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open the monkey menu, mouseover the "User Script Commands..." item
Close the tab
Check about:compartments for zombie compartments
Tested with GM 1.0, Firefox 15.0 and 17.0a1 (nightly from 2012-08-24).
The reason for this leak seems to be that GM_MenuCommander.onPopupShowing (via createMenuItem) attaches an event listener to the menu item, which via the command function keeps a reference to the content scope. Since the event listener is never removed, the scope and thus the compartment is held alive.
I'm only able to reproduce this once per Firefox instance though, not sure why.
This depends on DOM cleanup. I thought removing the element from the DOM meant Firefox also cleaned up the event handlers' references.
But if you have two separate GM_rmc scripts affecting two different domains, you can see that the first page's menu item causes a leaked compartment. The second time you open the menu on a different domain, you should see the first compartment removed, and the second compartment stays referenced by that different menu item.
But that's not what I see. I see the first page that you ever opened the menu on stay, forever. Everything else gets cleaned up as expected. I don't have an explanation yet.
Steps to reproduce:
Tested with GM 1.0, Firefox 15.0 and 17.0a1 (nightly from 2012-08-24).
The reason for this leak seems to be that GM_MenuCommander.onPopupShowing (via createMenuItem) attaches an event listener to the menu item, which via the command function keeps a reference to the content scope. Since the event listener is never removed, the scope and thus the compartment is held alive.
I'm only able to reproduce this once per Firefox instance though, not sure why.
(For reference, see also this comment on #1578.)
The text was updated successfully, but these errors were encountered: