Bustage fix for bug 591905: Don't try to reload an already visible page. a=bustage
authorDave Townsend <dtownsend@oxymoronical.com>
Wed, 09 Feb 2011 12:11:31 -0800
changeset 62242 0f10a0099dfc0f948c17e1669e1d04d781bebb3f
parent 62241 57cb22e845d41ce655e785b0a4dcbec2a77dc120
child 62243 36eb30154ca184d53b037a740e8c0c066dbe2d54
push id18659
push userdtownsend@mozilla.com
push dateWed, 09 Feb 2011 20:13:04 +0000
treeherdermozilla-central@0f10a0099dfc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs591905
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bustage fix for bug 591905: Don't try to reload an already visible page. a=bustage
toolkit/mozapps/extensions/content/extensions.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -1707,16 +1707,22 @@ var gDiscoverView = {
 
   hide: function() { },
 
   showError: function() {
     this.node.selectedPanel = this._error;
   },
 
   _loadURL: function(aURL, aCallback) {
+    if (this._browser.currentURI.spec == aURL) {
+      if (aCallback)
+        aCallback();
+      return;
+    }
+
     if (aCallback)
       this._loadListeners.push(aCallback);
 
     this._browser.loadURIWithFlags(aURL,
                                    Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY);
   },
 
   onLocationChange: function(aWebProgress, aRequest, aLocation) {