nsresult rv = NS_InitXPCOM(nsnull, nsnull, nsnull);
nsresult rv = NS_InitXPCOM(nsnull, nsnull);
int main(int argc, char **argv){	// Set up the toolbox and (if DEBUG) the console	InitializeMacToolbox();	// Install an a Quit AppleEvent handler.	OSErr err = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,									NewAEEventHandlerProc(handleQuitApplication), 0, false);	NS_ASSERTION((err==noErr), "AEInstallEventHandler failed");	// Start up XPCOM? 	nsresult rv = NS_InitXPCOM(nsnull, nsnull, nsnull);	NS_ASSERTION(NS_SUCCEEDED(rv), "NS_InitXPCOM failed"); 	// Hack to get il_ss set so it doesn't fail in xpcompat.c	// looks like we don't need this any more.	// nsCOMPtr<nsIImageManager> manager = do_GetService(kImageManagerCID, &rv);	// NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to get image manager service");		gTheApp = new nsNativeViewerApp();	if (gTheApp != nsnull) {		NS_ADDREF(gTheApp);		if (gTheApp->Initialize(argc, argv) == NS_OK)			gTheApp->Run();		NS_RELEASE(gTheApp);	}#ifdef DETECT_WEBSHELL_LEAKS	if ( unsigned long count = NS_TotalWebShellsInExistence() )  {		printf("XXX WARNING: Number of webshells being leaked: %d \n", count);	}#endif	// Shutdown XPCOM?	rv = NS_ShutdownXPCOM(nsnull);	NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");	return 0;}