we-care reminder addon creates multiple zombie compartments
steps to reproduce:
1) open tab and search for something in google, e.g. 'test'
2) wait till loading finishes, close tab
3) open tab and search in google for a series/movie you can buy, e.g. 'fringe'
4) wait till loading finishes, click imbb link
5) click buy from Amazon link (right hand side)
6) wait till loading finishes, close Amazon and imdb tabs.
7) go to about:memory?verbose and press 'minimize memory usage' a few times.
There are compartments for the initial search tab 'test' and for imdb tab.
Developer chased via AMO.
Hi. I'm the current developer in charge of fixing the zombie compartment issues in this Add-on. Currently, jquery functions such as 'keypress', 'keydown', 'change', and 'click' are causing the zombie compartment. This deductions is made through commenting out the code and finding no zombie compartments anymore.
Has there ever been a jquery connection with zombie compartments? The zombie compartment has the url of the first search done on google and then it stays that way the whole time without changing, even after multiple queries.
Bug 752904 and this bug suggest that there are zombie compartments originating from certain jQuery calls. If you are using jquery with web content, would it be possible to insert the script into the page instead of using a window-level script?
Stanton, do you have any updates on this?
I've been working on it on and off depending on priority of our other projects. We used jquery quite extensively throughout the code, so it's taking a little longer to deal with.
Right now, we are down to a maximum of two zombie compartments, both caused by jquery.
I recently found the following: http://stackoverflow.com/questions/10749237/jquery-tabs-creating-memory-leak-in-firefox-extension
It mentions using messageManager to load the jquery script locally to the specific browser/tab.
I've been trying to implement it and I cannot understand why I can't get the contentScript.js to load using the messageManager the way it was used in the example. Actually, I couldn't get any part of messageManager working, even the examples from the site.
Any advice would be greatly appreciated. Thanks!
If you still haven't resolved this issue, you can ask in the Add-ons Forum (https://forums.mozilla.org/addons/) or the #extdev IRC channel (http://irc.mozilla.org/).
I can't reproduce using the steps in comment 0. I'll be optimistic and assume Firefox 15 fixed this.
I had all the zombie compartments cleaned out in Firefox 14 be removing all Jquery functions that required any sort of iteration, but was left with a bunch of ghost windows.
Firefox 15 removed all the ghost windows.