rem: var profileSRC = RDF.GetResource( "urn:mozilla-registry:key:/Profiles" ); var profileProperty = RDF.GetResource( "urn:mozilla-registry:subkeys" ); var profiles = Registry.GetTargets( profileSRC, profileProperty, true ); if( profiles ) profiles = profiles.QueryInterface( Components.interfaces.nsISimpleEnumerator ); while( profiles.HasMoreElements() ) { var currProfile = profiles.GetNext().QueryInterface( Components.interfaces.nsIRDFResource );  var profileName = currProfile.Value.substring( currProfile.Value.lastIndexOf("/") + 1 );  var arcs = Registry.ArcLabelsOut( currProfile ) if( arcs ) arcs = arcs.QueryInterface( Components.interfaces.nsISimpleEnumerator ); while( arcs.HasMoreElements() ) 
add: try { var profileRoot = Registry.getKey(Registry.Common, "Profiles"); var regEnum = Registry.enumerateSubtrees( profileRoot );     regEnum.first(); while (true) 
context: function loadElements(){  var profileSRC = RDF.GetResource( "urn:mozilla-registry:key:/Profiles" );  var profileProperty = RDF.GetResource( "urn:mozilla-registry:subkeys" );  var profiles = Registry.GetTargets( profileSRC, profileProperty, true );  if( profiles )    profiles = profiles.QueryInterface( Components.interfaces.nsISimpleEnumerator );  while( profiles.HasMoreElements() )  {    var currProfile = profiles.GetNext().QueryInterface( Components.interfaces.nsIRDFResource );    // begin BAD BAD BAD BAD BAD BAD HACK {{    var profileName = currProfile.Value.substring( currProfile.Value.lastIndexOf("/") + 1 );    // }} end BAD BAD BAD BAD BAD BAD HACK    var arcs = Registry.ArcLabelsOut( currProfile )    if( arcs )       arcs = arcs.QueryInterface( Components.interfaces.nsISimpleEnumerator );    while( arcs.HasMoreElements() )     {      var property = arcs.GetNext().QueryInterface( Components.interfaces.nsIRDFResource );      if( property == kRegistry_Subkeys )        continue;      var propstr = property.Value.substring( REGISTRY_VALUE_PREFIX.length );      var target = Registry.GetTarget( currProfile, property, true );      var literal = target.QueryInterface( Components.interfaces.nsIRDFLiteral );      if( literal )         var targetstr = literal.Value;      else {        literal = target.QueryInterface( Components.interfaces.nsIRDFInt )        if( literal )           var targetstr = literal.Value;      }      if( propstr == "migrated" )        var migrated = targetstr;      else if( propstr == "directory" )        var directory = targetstr;    }    var profile = new Profile( profileName, directory, migrated );    AddItem( "profilekids", profile );  }  }
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/8d8fffcdaafb256a354616e6a0c158bf938775ca/profileSelection.js/buggy/profile/resources/content/profileSelection.js