HelpClosure* closure = NS_STATIC_CAST(HelpClosure*, aData);  nsXPIDLCString value; rv = closure->catman->GetCategoryEntry("command-line-handler", aEntry.get(), getter_Copies(value)); NS_ENSURE_SUCCESS(rv, PR_TRUE);  nsCOMPtr<nsICommandLineHandler> clh (do_GetService(value)); NS_ENSURE_TRUE(clh, PR_TRUE);
EnumHelp(nsCString& aEntry, void* aData){  nsresult rv;  HelpClosure* closure = NS_STATIC_CAST(HelpClosure*, aData);  nsXPIDLCString value;  rv = closure->catman->GetCategoryEntry("command-line-handler",                                         aEntry.get(),                                         getter_Copies(value));  NS_ENSURE_SUCCESS(rv, PR_TRUE);  nsCOMPtr<nsICommandLineHandler> clh (do_GetService(value));  NS_ENSURE_TRUE(clh, PR_TRUE);  nsCString text;  rv = clh->GetHelpInfo(text);  if (NS_SUCCEEDED(rv)) {    NS_ASSERTION(text.Length() == 0 || text.Last() == '\n',                 "Help text from command line handlers should end in a newline.");    closure->text.Append(text);  }  return PR_TRUE;}  