if ( count = NS_TotalWebShellsInExistence() )  { printf("XXX WARNING: Number of webshells being leaked: %d \n", count);
count = NS_TotalWebShellsInExistence(); if (count)  { printf("XXX WARNING: Number of webshells being leaked: %d \n", (int)count);
int main(int argc, char* argv[]){#if defined(XP_UNIX)  InstallUnixSignalHandlers(argv[0]);#endif  nsresult rv;  /* -help and -version should return quick */  if (argc == 2) {	if ((PL_strcasecmp(argv[1], "-h") == 0) || (PL_strcasecmp(argv[1], "-help") == 0) #ifdef XP_UNIX|| (PL_strcasecmp(argv[1], "--help") == 0)#endif /* XP_UNIX */#ifdef XP_PC|| (PL_strcasecmp(argv[1], "/h") == 0) || (PL_strcasecmp(argv[1], "/help") == 0) || (PL_strcasecmp(argv[1], "/?") == 0)#endif /* XP_PC */    ) {		DumpHelp(argv[0]);		return 0;	}	else if ((PL_strcasecmp(argv[1], "-v") == 0) || (PL_strcasecmp(argv[1], "-version") == 0) #ifdef XP_UNIX|| (PL_strcasecmp(argv[1], "--version") == 0)#endif /* XP_UNIX */#ifdef XP_PC|| (PL_strcasecmp(argv[1], "/v") == 0) || (PL_strcasecmp(argv[1], "/version") == 0)#endif /* XP_PC */    ) {		DumpVersion(argv[0]);		return 0;	}  }      // Call the code to install our handler#ifdef MOZ_JPROF  setupProfilingStuff();#endif  if( !NS_CanRun() )    return 1;   // Note: this object is not released here.  It is passed to main1 which  //       has responsibility to release it.  nsISplashScreen *splash = 0;  // We can't use the command line service here because it isn't running yet#if defined(XP_UNIX) && !defined(NTO)  PRBool dosplash = PR_FALSE;  for (int i=0; i<argc; i++)    if ((PL_strcasecmp(argv[i], "-splash") == 0)        || (PL_strcasecmp(argv[i], "--splash") == 0))      dosplash = PR_TRUE;#else          PRBool dosplash = PR_TRUE;  for (int i=0; i<argc; i++)    if ((PL_strcasecmp(argv[i], "-nosplash") == 0)        || (PL_strcasecmp(argv[i], "/nosplash") == 0))      dosplash = PR_FALSE;#endif  if (dosplash) {      rv = NS_CreateSplashScreen( &splash );      NS_ASSERTION( NS_SUCCEEDED(rv), "NS_CreateSplashScreen failed" );  }  // If the platform has a splash screen, show it ASAP.  if ( splash ) {      splash->Show();  }  rv = NS_InitXPCOM(NULL, NULL);  NS_ASSERTION( NS_SUCCEEDED(rv), "NS_InitXPCOM failed" );  nsresult result = main1( argc, argv, splash );  {        // Scoping this in a block to force the pref service to be                   // released.         //	// save the prefs, in case they weren't saved	NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &rv);	NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get prefs, so unable to save them");	if (NS_SUCCEEDED(rv)) {		prefs->SavePrefFile();	}    }#ifdef DETECT_WEBSHELL_LEAKS  unsigned long count;  if ( count = NS_TotalWebShellsInExistence() )  {    printf("XXX WARNING: Number of webshells being leaked: %d \n", count);  }#endif  // at this point, all that is on the clipboard is a proxy object, but that object  // won't be valid once the app goes away. As a result, we need to force the data  // out of that proxy and properly onto the clipboard. This can't be done in the  // clipboard service's shutdown routine because it requires the parser/etc which  // has already been shutdown by the time the clipboard is shut down.  NS_WITH_SERVICE(nsIClipboard, clipService, "component://netscape/widget/clipboard", &rv);  if ( clipService )    clipService->ForceDataToClipboard();  rv = NS_ShutdownXPCOM( NULL );  NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");  return TranslateReturnValue( result );}