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 id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersbustage
bugs591905
milestone2.0b12pre
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) {