FIXED: The addTabsProgressListener now removes itself from the initial window if it closes BEFORE Feature.uninit (i.e. WindowWatcher.stop) is called. So now, we get mTabsProgressListeners.length down to 0 when that window is closed instead of 1.
Reason: We were previously not handling the onWindowClose event in the WindowWatcher observe function -- Are event listeners on windows automatically removed on window close? NO.
Also ensures the addTabsProgressListener is added to any newly created windows.
Currently the code is bisected (i.e a large chunk is commented out) for leak debugging purposes. It gets as far into Feature.jsm as addTabsProgressListener and into a portion of its listener onLocationChange.
This is the start of a fix for #88.
FIXED: The addTabsProgressListener now removes itself from the initial window if it closes BEFORE Feature.uninit (i.e. WindowWatcher.stop) is called. So now, we get mTabsProgressListeners.length down to 0 when that window is closed instead of 1. Reason: We were previously not handling the onWindowClose event in the WindowWatcher observe function -- Are event listeners on windows automatically removed on window close? NO.
Also ensures the addTabsProgressListener is added to any newly created windows.
Currently the code is bisected (i.e a large chunk is commented out) for leak debugging purposes. It gets as far into Feature.jsm as
addTabsProgressListener
and into a portion of its listeneronLocationChange
.