B2G/gecko/toolkit/components/places/tests/head_common.js
/**
 * Retrieves the guid for a given bookmark.
 *
 * @param aId
 *        The bookmark id to check.
 * @param [optional] aStack
 *        The stack frame used to report the error.
 * @return the associated the guid.
 */
Retrieves the guid for a given bookmark.
@param aId
The bookmark id to check.
@param [optional] aStack
The stack frame used to report the error.
@return the associated the guid.
Retrieves the guid for a given bookmark . @param aId The bookmark id to check . @param [ optional ] aStack The stack frame used to report the error . @return the associated the guid .
function do_get_guid_for_bookmark(aId,
                                  aStack)
{
  if (!aStack) {
    aStack = Components.stack.caller;
  }
  let stmt = DBConn().createStatement(
    "SELECT guid "
  + "FROM moz_bookmarks "
  + "WHERE id = :item_id "
  );
  stmt.params.item_id = aId;
  do_check_true(stmt.executeStep(), aStack);
  let guid = stmt.row.guid;
  stmt.finalize();
  do_check_valid_places_guid(guid, aStack);
  return guid;
}
function do_get_guid_for_bookmark ( aId , aStack ) { if ( ! aStack ) { aStack = Components . stack . caller ; } let stmt = DBConn ( ) . createStatement ( "SELECT guid " + "FROM moz_bookmarks " + "WHERE id = :item_id " ) ; stmt . params . item_id = aId ; do_check_true ( stmt . executeStep ( ) , aStack ) ; let guid = stmt . row . guid ; stmt . finalize ( ) ; do_check_valid_places_guid ( guid , aStack ) ; return guid ; }
Retrieves the guid for a given bookmark.
Retrieves the guid for a given bookmark .