B2G/gecko/toolkit/mozapps/extensions/XPIProvider.jsm
/**
 * The DBAddonInternal is a special AddonInternal that has been retrieved from
 * the database. Add-ons retrieved synchronously only have the basic metadata
 * the rest is filled out synchronously when needed. Asynchronously read add-ons
 * have all data available.
 */
The DBAddonInternal is a special AddonInternal that has been retrieved from
the database. Add-ons retrieved synchronously only have the basic metadata
the rest is filled out synchronously when needed. Asynchronously read add-ons
have all data available.
The DBAddonInternal is a special AddonInternal that has been retrieved from the database . Add - ons retrieved synchronously only have the basic metadata the rest is filled out synchronously when needed . Asynchronously read add - ons have all data available .
function DBAddonInternal() {
  this.__defineGetter__("targetApplications", function DBA_targetApplicationsGetter() {
    delete this.targetApplications;
    return this.targetApplications = XPIDatabase._getTargetApplications(this);
  });
  this.__defineGetter__("targetPlatforms", function DBA_targetPlatformsGetter() {
    delete this.targetPlatforms;
    return this.targetPlatforms = XPIDatabase._getTargetPlatforms(this);
  });
  this.__defineGetter__("locales", function DBA_localesGetter() {
    delete this.locales;
    return this.locales = XPIDatabase._getLocales(this);
  });
  this.__defineGetter__("defaultLocale", function DBA_defaultLocaleGetter() {
    delete this.defaultLocale;
    return this.defaultLocale = XPIDatabase._getDefaultLocale(this);
  });
  this.__defineGetter__("pendingUpgrade", function DBA_pendingUpgradeGetter() {
    delete this.pendingUpgrade;
    for (let install of XPIProvider.installs) {
      if (install.state == AddonManager.STATE_INSTALLED &&
          !(install.addon instanceof DBAddonInternal) &&
          install.addon.id == this.id &&
          install.installLocation == this._installLocation) {
        return this.pendingUpgrade = install.addon;
      }
    };
  });
}
function DBAddonInternal ( ) { this . __defineGetter__ ( "targetApplications" , function DBA_targetApplicationsGetter ( ) { delete this . targetApplications ; return this . targetApplications = XPIDatabase . _getTargetApplications ( this ) ; } ) ; this . __defineGetter__ ( "targetPlatforms" , function DBA_targetPlatformsGetter ( ) { delete this . targetPlatforms ; return this . targetPlatforms = XPIDatabase . _getTargetPlatforms ( this ) ; } ) ; this . __defineGetter__ ( "locales" , function DBA_localesGetter ( ) { delete this . locales ; return this . locales = XPIDatabase . _getLocales ( this ) ; } ) ; this . __defineGetter__ ( "defaultLocale" , function DBA_defaultLocaleGetter ( ) { delete this . defaultLocale ; return this . defaultLocale = XPIDatabase . _getDefaultLocale ( this ) ; } ) ; this . __defineGetter__ ( "pendingUpgrade" , function DBA_pendingUpgradeGetter ( ) { delete this . pendingUpgrade ; for ( let install of XPIProvider . installs ) { if ( install . state == AddonManager . STATE_INSTALLED && ! ( install . addon instanceof DBAddonInternal ) && install . addon . id == this . id && install . installLocation == this . _installLocation ) { return this . pendingUpgrade = install . addon ; } } ; } ) ; }
The DBAddonInternal is a special AddonInternal that has been retrieved from
 the database.
The DBAddonInternal is a special AddonInternal that has been retrieved from the database .