Bug 583871 - Warning: redeclaration of property getSelectedAddon. r=rstrong, a=dtownsend
authorBen Parr <bparr@mozilla.com>
Tue, 03 Aug 2010 12:59:51 +1200
changeset 48754 6229a8b84769f2713c66e7dd74891950750dbb71
parent 48753 daeaf3e519d7090c5eba0c196fecb2c87a643ee5
child 48755 a731dc8d3b27b9bf0494cd4396a0448bd8b28c45
push id14799
push userbmcbride@mozilla.com
push dateTue, 03 Aug 2010 01:12:06 +0000
treeherdermozilla-central@a731dc8d3b27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong, dtownsend
bugs583871
milestone2.0b3pre
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
Bug 583871 - Warning: redeclaration of property getSelectedAddon. r=rstrong, a=dtownsend
toolkit/mozapps/extensions/content/extensions.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -662,17 +662,17 @@ var gViewController = {
 
   updateCommand: function(aCommandId, aAddon) {
     if (typeof aAddon == "undefined")
       aAddon = this.currentViewObj.getSelectedAddon();
     var cmd = this.commands[aCommandId];
     var cmdElt = document.getElementById(aCommandId);
     cmdElt.setAttribute("disabled", !cmd.isEnabled(aAddon));
     if ("getTooltip" in cmd) {
-      let tooltip = cmd.getTooltip(aAddon);        
+      let tooltip = cmd.getTooltip(aAddon);
       if (tooltip)
         cmdElt.setAttribute("tooltiptext", tooltip);
       else
         cmdElt.removeAttribute("tooltiptext");
     }
   },
 
   doCommand: function(aCommand, aAddon) {
@@ -960,17 +960,17 @@ var gHeader = {
   get isSearching() {
     return this._searching.hasAttribute("active");
   },
 
   set isSearching(aIsSearching) {
     if (aIsSearching)
       this._searching.setAttribute("active", true);
     else
-      this._searching.removeAttribute("active");    
+      this._searching.removeAttribute("active");
   }
 };
 
 
 var gDiscoverView = {
   node: null,
   enabled: true,
   _browser: null,
@@ -1612,17 +1612,17 @@ var gUpdatesView = {
     this._updatePrefs.addObserver("", this, false);
     this.updateBackgroundCheck();
     this.updateManualUpdatersCount(true);
     this.updateAvailableCount(true);
 
     AddonManager.addAddonListener(this);
     AddonManager.addInstallListener(this);
   },
-  
+
   shutdown: function() {
     AddonManager.removeAddonListener(this);
     AddonManager.removeInstallListener(this);
     this._updatePrefs.removeObserver("", this);
     delete this._updatePrefs;
   },
 
   show: function(aType, aRequest) {
@@ -1697,20 +1697,16 @@ var gUpdatesView = {
       // ensure badge count is in sync
       self._categoryItem.badgeCount = self._listBox.itemCount;
 
       if (!aIsRefresh)
         gViewController.notifyViewChanged();
     });
   },
 
-  getSelectedAddon: function() {
-    return null;
-  },
-
   showEmptyNotice: function(aShow) {
     this._emptyNotice.hidden = !aShow;
   },
 
   isManualUpdate: function(aInstall, aOnlyAvailable) {
     var isManual = aInstall.existingAddon &&
                    aInstall.existingAddon.applyBackgroundUpdates === false;
     if (isManual && aOnlyAvailable)
@@ -1770,17 +1766,17 @@ var gUpdatesView = {
       var count = aInstallsList.filter(function(aInstall) {
         return self.isManualUpdate(aInstall, true);
       }).length;
       self._categoryItem.badgeCount = count;
       if (aInitializing)
         notifyInitialized();
     });
   },
-  
+
   getSelectedAddon: function() {
     var item = this._listBox.selectedItem;
     if (item)
       return item.mAddon;
     return null;
   },
 
   getListItemForID: function(aId) {
@@ -1803,17 +1799,17 @@ var gUpdatesView = {
     sortService.sort(this._listBox, aSortBy, hints);
   },
 
   onNewInstall: function(aInstall) {
     if (!this.isManualUpdate(aInstall))
       return;
     this.maybeRefresh();
   },
-  
+
   onExternalInstall: function(aAddon) {
     if (aAddon.applyBackgroundUpdates === false) {
       this._numManualUpdaters++;
       this.maybeShowCategory();
     }
   },
 
   onDownloadStarted: function(aInstall) {