B2G/gecko/toolkit/mozapps/extensions/XPIProvider.jsm
/**
     * Updates an add-on's descriptor for when the add-on has moved in the
     * filesystem but hasn't changed in any other way.
     *
     * @param  aInstallLocation
     *         The install location containing the add-on
     * @param  aOldAddon
     *         The AddonInternal as it appeared the last time the application
     *         ran
     * @param  aAddonState
     *         The new state of the add-on
     * @return a boolean indicating if flushing caches is required to complete
     *         changing this add-on
     */
Updates an add-on's descriptor for when the add-on has moved in the
filesystem but hasn't changed in any other way.

@param  aInstallLocation
The install location containing the add-on
@param  aOldAddon
The AddonInternal as it appeared the last time the application
ran
@param  aAddonState
The new state of the add-on
@return a boolean indicating if flushing caches is required to complete
changing this add-on
Updates an add - on ' s descriptor for when the add - on has moved in the filesystem but hasn ' t changed in any other way . @param aInstallLocation The install location containing the add - on @param aOldAddon The AddonInternal as it appeared the last time the application ran @param aAddonState The new state of the add - on @return a boolean indicating if flushing caches is required to complete changing this add - on
function updateDescriptor(aInstallLocation, aOldAddon, aAddonState) {
      LOG("Add-on " + aOldAddon.id + " moved to " + aAddonState.descriptor);
      aOldAddon._descriptor = aAddonState.descriptor;
      aOldAddon.visible = !(aOldAddon.id in visibleAddons);
      XPIDatabase.setAddonDescriptor(aOldAddon, aAddonState.descriptor);
      if (aOldAddon.visible) {
        visibleAddons[aOldAddon.id] = aOldAddon;
        if (aOldAddon.bootstrap && aOldAddon.active) {
          let bootstrap = oldBootstrappedAddons[aOldAddon.id];
          bootstrap.descriptor = aAddonState.descriptor;
          XPIProvider.bootstrappedAddons[aOldAddon.id] = bootstrap;
        }
        return true;
      }
      return false;
    }
function updateDescriptor ( aInstallLocation , aOldAddon , aAddonState ) { LOG ( "Add-on " + aOldAddon . id + " moved to " + aAddonState . descriptor ) ; aOldAddon . _descriptor = aAddonState . descriptor ; aOldAddon . visible = ! ( aOldAddon . id in visibleAddons ) ; XPIDatabase . setAddonDescriptor ( aOldAddon , aAddonState . descriptor ) ; if ( aOldAddon . visible ) { visibleAddons [ aOldAddon . id ] = aOldAddon ; if ( aOldAddon . bootstrap && aOldAddon . active ) { let bootstrap = oldBootstrappedAddons [ aOldAddon . id ] ; bootstrap . descriptor = aAddonState . descriptor ; XPIProvider . bootstrappedAddons [ aOldAddon . id ] = bootstrap ; } return true ; } return false ; }
Updates an add-on's descriptor for when the add-on has moved in the
 filesystem but hasn't changed in any other way.
Updates an add - on ' s descriptor for when the add - on has moved in the filesystem but hasn ' t changed in any other way .
// Update the database