B2G/gecko/toolkit/components/places/tests/queries/head_queries.js
/**
 * A nice helper function for debugging things. It LOGs the contents of a
 * result set.
 */
A nice helper function for debugging things. It LOGs the contents of a
result set.
A nice helper function for debugging things . It LOGs the contents of a result set .
function displayResultSet(aRoot) {
  var wasOpen = aRoot.containerOpen;
  if (!wasOpen)
    aRoot.containerOpen = true;
  if (!aRoot.hasChildren) {
    LOG("Result Set Empty");
    return;
  }
  for (var i=0; i < aRoot.childCount; ++i) {
    LOG("Result Set URI: " + aRoot.getChild(i).uri + "   Title: " +
        aRoot.getChild(i).title + "   Visit Time: " + aRoot.getChild(i).time);
  }
  if (!wasOpen)
    aRoot.containerOpen = false;
}
function displayResultSet ( aRoot ) { var wasOpen = aRoot . containerOpen ; if ( ! wasOpen ) aRoot . containerOpen = true ; if ( ! aRoot . hasChildren ) { LOG ( "Result Set Empty" ) ; return ; } for ( var i = 0 ; i < aRoot . childCount ; ++ i ) { LOG ( "Result Set URI: " + aRoot . getChild ( i ) . uri + "   Title: " + aRoot . getChild ( i ) . title + "   Visit Time: " + aRoot . getChild ( i ) . time ) ; } if ( ! wasOpen ) aRoot . containerOpen = false ; }
A nice helper function for debugging things.
A nice helper function for debugging things .
// Something wrong? Empty result set?