B2G/gecko/toolkit/mozapps/extensions/XPIProvider.jsm
/**
   * toJSON is called by JSON.stringify in order to create a filtered version
   * of this object to be serialized to a JSON file. A new object is returned
   * with copies of all non-private properties. Functions, getters and setters
   * are not copied.
   *
   * @param  aKey
   *         The key that this object is being serialized as in the JSON.
   *         Unused here since this is always the main object serialized
   *
   * @return an object containing copies of the properties of this object
   *         ignoring private properties, functions, getters and setters
   */
toJSON is called by JSON.stringify in order to create a filtered version
of this object to be serialized to a JSON file. A new object is returned
with copies of all non-private properties. Functions, getters and setters
are not copied.

@param  aKey
The key that this object is being serialized as in the JSON.
Unused here since this is always the main object serialized

@return an object containing copies of the properties of this object
ignoring private properties, functions, getters and setters
toJSON is called by JSON . stringify in order to create a filtered version of this object to be serialized to a JSON file . A new object is returned with copies of all non - private properties . Functions getters and setters are not copied . @param aKey The key that this object is being serialized as in the JSON . Unused here since this is always the main object serialized @return an object containing copies of the properties of this object ignoring private properties functions getters and setters
function AddonInternal_toJSON(aKey) {
    let obj = {};
    for (let prop in this) {
      if (prop.substring(0, 1) == "_")
        continue;
      if (this.__lookupGetter__(prop))
        continue;
      if (this.__lookupSetter__(prop))
        continue;
      if (typeof this[prop] == "function")
        continue;
      obj[prop] = this[prop];
    }
    return obj;
  }
function AddonInternal_toJSON ( aKey ) { let obj = { } ; for ( let prop in this ) { if ( prop . substring ( 0 , 1 ) == "_" ) continue ; if ( this . __lookupGetter__ ( prop ) ) continue ; if ( this . __lookupSetter__ ( prop ) ) continue ; if ( typeof this [ prop ] == "function" ) continue ; obj [ prop ] = this [ prop ] ; } return obj ; }
toJSON is called by JSON.stringify in order to create a filtered version
 of this object to be serialized to a JSON file.
toJSON is called by JSON . stringify in order to create a filtered version of this object to be serialized to a JSON file .
// Ignore private properties // Ignore getters // Ignore setters // Ignore functions