function update(record) {
    let addon = this.getAddonByID(record.addonID);

    // update() is called if !this.itemExists. And, since itemExists consults
    // the reconciler only, we need to take care of some corner cases.
    //
    // First, the reconciler could know about an add-on that was uninstalled
    // and no longer present in the add-ons manager.
    if (!addon) {
      this.create(record);
      return;
    }

    // It's also possible that the add-on is non-restartless and has pending
    // install/uninstall activity.
    //
    // We wouldn't get here if the incoming record was for a deletion. So,
    // check for pending uninstall and cancel if necessary.
    if (addon.pendingOperations & AddonManager.PENDING_UNINSTALL) {
      addon.cancelUninstall();

      // We continue with processing because there could be state or ID change.
    }

    let cb = Async.makeSpinningCallback();
    this.updateUserDisabled(addon, !record.enabled, cb);
    cb.wait();
  }
/**
   * Provides core Store API to update an add-on from a record.
   */
Provides core Store API to update an add-on from a record.
Provides core Store API to update an add - on from a record .
function update(record) {
    let addon = this.getAddonByID(record.addonID);
     First, the reconciler could know about an add-on that was uninstalled
     and no longer present in the add-ons manager.
    if (!addon) {
      this.create(record);
      return;
    }
     It's also possible that the add-on is non-restartless and has pending
     install/uninstall activity.
     We wouldn't get here if the incoming record was for a deletion. So,
     check for pending uninstall and cancel if necessary.
    if (addon.pendingOperations & AddonManager.PENDING_UNINSTALL) {
      addon.cancelUninstall();
       We continue with processing because there could be state or ID change.
    }
    let cb = Async.makeSpinningCallback();
    this.updateUserDisabled(addon, !record.enabled, cb);
    cb.wait();
  }
function update ( record ) { let addon = this . getAddonByID ( record . addonID ) ; if ( ! addon ) { this . create ( record ) ; return ; } if ( addon . pendingOperations & AddonManager . PENDING_UNINSTALL ) { addon . cancelUninstall ( ) ; } let cb = Async . makeSpinningCallback ( ) ; this . updateUserDisabled ( addon , ! record . enabled , cb ) ; cb . wait ( ) ; }
Provides core Store API to update an add-on from a record.
Provides core Store API to update an add - on from a record .
// update() is called if !this.itemExists. And, since itemExists consults // the reconciler only, we need to take care of some corner cases. // // First, the reconciler could know about an add-on that was uninstalled // and no longer present in the add-ons manager. // It's also possible that the add-on is non-restartless and has pending // install/uninstall activity. // // We wouldn't get here if the incoming record was for a deletion. So, // check for pending uninstall and cancel if necessary. // We continue with processing because there could be state or ID change.