B2G/gecko/toolkit/components/places/tests/head_common.js
/**
 * Returns the hidden status of a url.
 *
 * @param aURI
 *        The URI or spec to get hidden for.
 * @return @return true if the url is hidden, false otherwise.
 */
Returns the hidden status of a url.
@param aURI
The URI or spec to get hidden for.
@return @return true if the url is hidden, false otherwise.
Returns the hidden status of a url . @param aURI The URI or spec to get hidden for . @return @return true if the url is hidden false otherwise .
function isUrlHidden(aURI)
{
  let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
  let stmt = DBConn().createStatement(
    "SELECT hidden FROM moz_places WHERE url = ?1"
  );
  stmt.bindByIndex(0, url);
  if (!stmt.executeStep())
    throw new Error("No result for hidden.");
  let hidden = stmt.getInt32(0);
  stmt.finalize();
  return !!hidden;
}
function isUrlHidden ( aURI ) { let url = aURI instanceof Ci . nsIURI ? aURI . spec : aURI ; let stmt = DBConn ( ) . createStatement ( "SELECT hidden FROM moz_places WHERE url = ?1" ) ; stmt . bindByIndex ( 0 , url ) ; if ( ! stmt . executeStep ( ) ) throw new Error ( "No result for hidden." ) ; let hidden = stmt . getInt32 ( 0 ) ; stmt . finalize ( ) ; return ! ! hidden ; }
Returns the hidden status of a url.
Returns the hidden status of a url .