diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 2a417d4aaca..bceea24776a 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -3203,6 +3203,7 @@ let gViewportMargins = { top: 0, right: 0, bottom: 0, left: 0}; let gTilesReportURL = null; function Tab(aURL, aParams) { + this.filter = null; this.browser = null; this.id = 0; this.lastTouchedAt = Date.now(); @@ -3357,7 +3358,9 @@ Tab.prototype = { let flags = Ci.nsIWebProgress.NOTIFY_STATE_ALL | Ci.nsIWebProgress.NOTIFY_LOCATION | Ci.nsIWebProgress.NOTIFY_SECURITY; - this.browser.addProgressListener(this, flags); + this.filter = Cc["@mozilla.org/appshell/component/browser-status-filter;1"].createInstance(Ci.nsIWebProgress); + this.filter.addProgressListener(this, flags) + this.browser.addProgressListener(this.filter, flags); this.browser.sessionHistory.addSHistoryListener(this); this.browser.addEventListener("DOMContentLoaded", this, true); @@ -3532,7 +3535,9 @@ Tab.prototype = { this.browser.contentWindow.controllers.removeController(this.overscrollController); - this.browser.removeProgressListener(this); + this.browser.removeProgressListener(this.filter); + this.filter.removeProgressListener(this); + this.filter = null; this.browser.sessionHistory.removeSHistoryListener(this); this.browser.removeEventListener("DOMContentLoaded", this, true); @@ -4489,9 +4494,13 @@ Tab.prototype = { }, onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { + // Note: aWebProgess and aRequest will be NULL since we are filtering webprogress + // notifications using nsBrowserStatusFilter. }, onStatusChange: function(aBrowser, aWebProgress, aRequest, aStatus, aMessage) { + // Note: aWebProgess and aRequest will be NULL since we are filtering webprogress + // notifications using nsBrowserStatusFilter. }, _getGeckoZoom: function() {