Closed
Bug 727552
Opened 13 years ago
Closed 13 years ago
Galaxytoolbar add-on creates zombie compartments
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
People
(Reporter: kmag, Unassigned)
References
Details
(Whiteboard: [MemShrink])
The Galaxytoolbar add-on[1] creates zombie compartments for the web pages it interacts with. As far as I can tell, zombie compartments replace previous zombie compartments rather than accumulating.
[1] https://addons.mozilla.org/addon/galaxytoolbar/
Reporter | ||
Comment 1•13 years ago
|
||
CCing developer.
Comment 2•13 years ago
|
||
Yes, thanks for finding that. I am on to fix it.
Comment 3•13 years ago
|
||
OK. Just to give some feedback for the moment.
I already found two issues which caused memory leaks in my extension:
- I always stored a reference to the last opened document handled by my extension in an object property of my AddOn
- I had some undeclared variables (no "var"), assigned DOM Elements to them, and after my function was over, a compartment of the whole document stayed in Firefox Memory. Seems as if I polluted global namespace and so the GC was not able to recognize that the document reference could be cleaned from memory.
The second issue was quite hard to find, and I need to investigate further, if something like this is in other parts of my AddOn
Comment 4•13 years ago
|
||
(In reply to Jan from comment #3)
> OK. Just to give some feedback for the moment.
>
> I already found two issues which caused memory leaks in my extension:
> - I always stored a reference to the last opened document handled by my
> extension in an object property of my AddOn
> - I had some undeclared variables (no "var"), assigned DOM Elements to
> them, and after my function was over, a compartment of the whole document
> stayed in Firefox Memory. Seems as if I polluted global namespace and so the
> GC was not able to recognize that the document reference could be cleaned
> from memory.
>
> The second issue was quite hard to find, and I need to investigate further,
> if something like this is in other parts of my AddOn
Use "use strict;"! https://developer.mozilla.org/en/JavaScript/Strict_mode
Comment 5•13 years ago
|
||
Ok, I uploaded a new version to AMO (v2.6.12). This version should fix zombie compartments and another leak, which I found while testing. (sqlite-dbconnection wasn't closed properly in the options window when there were asynch operations waiting)
Reporter | ||
Comment 6•13 years ago
|
||
Thanks for the quick fix.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•