rem: if (aSubject) { var item = aSubject.QueryInterface(Components.interfaces.nsIUpdateItem); gUpdateWizard.errorItems.push(item); } else { for (var i = 0; i < gUpdateWizard.items.length; ++i) { if (!gUpdateWizard.items[i].updateRDF) gUpdateWizard.errorItems.push(gUpdateWizard.items[i]); } } 
add: var item = aSubject.QueryInterface(Components.interfaces.nsIUpdateItem); gUpdateWizard.errorItems.push(item); 
context:   observe: function (aSubject, aTopic, aData)  {    var canFinish = false;    dump("*** items = " + gUpdateWizard.items + "\n");    switch (aTopic) {    case "Update:Extension:Started":      break;    case "Update:Extension:Item-Started":      break;    case "Update:Extension:Item-Ended":      if (aData == "update-check-success") {        var item = aSubject.QueryInterface(Components.interfaces.nsIUpdateItem);        gUpdateWizard.itemsToUpdate.push(item);              var updateStrings = document.getElementById("updateStrings");        var status = document.getElementById("checking.status");        var statusString = updateStrings.getFormattedString("checkingPrefix", [item.name]);        status.setAttribute("value", statusString);      }      ++this._completeCount;      // Update the Progress Bar                  var progress = document.getElementById("checking.progress");      progress.value = Math.ceil((this._completeCount / this.totalCount) * 100);            break;    case "Update:Extension:Item-Error":      if (aSubject) {        var item = aSubject.QueryInterface(Components.interfaces.nsIUpdateItem);        gUpdateWizard.errorItems.push(item);      }      else {        for (var i = 0; i < gUpdateWizard.items.length; ++i) {          if (!gUpdateWizard.items[i].updateRDF)            gUpdateWizard.errorItems.push(gUpdateWizard.items[i]);        }      }      ++this._completeCount;      var progress = document.getElementById("checking.progress");      progress.value = Math.ceil((this._completeCount / this.totalCount) * 100);      break;    case "Update:Extension:Ended":      canFinish = gUpdateWizard.items.length > 0;      dump("*** " + aTopic + "... canFinish = " + canFinish + "\n");      break;    case "Update:Ended":      // If we're doing a general update check, (that is, no specific extensions/themes      // were passed in for us to check for updates to), this notification means both      // extension and app updates have completed.      canFinish = true;      break;    }    if (canFinish) {      gUpdatePage.uninit();      if ((gUpdateTypes & nsIUpdateItem.TYPE_ADDON && gUpdateWizard.itemsToUpdate.length > 0))        document.getElementById("checking").setAttribute("next", "found");      document.documentElement.advance();    }  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/21b2acb9dc6bcf2cf9601c89dbb2d656b60766f7/update.js/buggy/toolkit/mozapps/extensions/content/update.js