[Pkg-mozext-commits] [nosquint] 33/47: Remove ProgressListener for each open tab on window close

David Prévot taffit at moszumanska.debian.org
Tue Apr 28 01:41:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 2.1.6
in repository nosquint.

commit a2ae61fd74375c0903747742173f40ba5c3ed4e2
Author: Jason Tackaberry <tack at urandom.ca>
Date:   Wed Jan 25 20:00:30 2012 -0500

    Remove ProgressListener for each open tab on window close
    
    Fixes #1 which reports zombie compartments.
---
 src/content/browser.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/content/browser.js b/src/content/browser.js
index cfd01ea..e112b96 100644
--- a/src/content/browser.js
+++ b/src/content/browser.js
@@ -64,6 +64,16 @@ NoSquint.browser = NoSquint.ns(function() { with (NoSquint) {
         if (NSQ.storage.dialogs.site)
             NSQ.storage.dialogs.site.die();
 
+        /* When the window is closed, the Tabclose event doesn't fire for each
+         * browser tab automatically, so we must clean up explicitly.
+         *
+         * This fixes issue #1 which reports zombie compartments.
+         */
+        for (let browser in iter(gBrowser.browsers)) {
+            browser.removeProgressListener(browser.getUserData('nosquint').listener);
+            browser.setUserData('nosquint', null, null);
+        }
+
         gBrowser.tabContainer.removeEventListener('TabOpen', this.handleTabOpen, false);
         gBrowser.tabContainer.removeEventListener('TabSelect', this.handleTabSelect, false);
         gBrowser.tabContainer.removeEventListener('TabClose', this.handleTabClose, false);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/nosquint.git



More information about the Pkg-mozext-commits mailing list