B2G/gecko/toolkit/components/places/tests/queries/test_async.js
/**
   * Returns a copy of aData, except that any properties that are undefined but
   * defined in aDefaults are set to the corresponding values in aDefaults.
   *
   * @param  aData
   *         An object describing a bookmark item.
   * @param  aDefaults
   *         An object describing the default bookmark item.
   * @return A copy of aData with defaults values set.
   */
Returns a copy of aData, except that any properties that are undefined but
defined in aDefaults are set to the corresponding values in aDefaults.

@param  aData
An object describing a bookmark item.
@param  aDefaults
An object describing the default bookmark item.
@return A copy of aData with defaults values set.
Returns a copy of aData except that any properties that are undefined but defined in aDefaults are set to the corresponding values in aDefaults . @param aData An object describing a bookmark item . @param aDefaults An object describing the default bookmark item . @return A copy of aData with defaults values set .
function DH__makeDataWithDefaults(aData, aDefaults) {
    let dat = {};
    for (let [prop, val] in Iterator(aDefaults)) {
      dat[prop] = aData.hasOwnProperty(prop) ? aData[prop] : val;
    }
    return dat;
  }
function DH__makeDataWithDefaults ( aData , aDefaults ) { let dat = { } ; for ( let [ prop , val ] in Iterator ( aDefaults ) ) { dat [ prop ] = aData . hasOwnProperty ( prop ) ? aData [ prop ] : val ; } return dat ; }
Returns a copy of aData, except that any properties that are undefined but
 defined in aDefaults are set to the corresponding values in aDefaults.
Returns a copy of aData except that any properties that are undefined but defined in aDefaults are set to the corresponding values in aDefaults .