(void)OpenWindow( arg, "" );
if (NS_SUCCEEDED(EnsureProfile(args))) (void)OpenWindow( arg, "" );
nsNativeAppSupportWin::HandleRequest( LPBYTE request, PRBool newWindow ) {    // Parse command line.        nsCOMPtr<nsICmdLineService> args;    nsresult rv;    rv = GetCmdLineArgs( request, getter_AddRefs( args ) );    if (NS_FAILED(rv)) return;    // first see if there is a url    nsXPIDLCString arg;    rv = args->GetURLToLoad(getter_Copies(arg));    if (NS_SUCCEEDED(rv) && (const char*)arg ) {      // Launch browser.#if MOZ_DEBUG_DDE      printf( "Launching browser on url [%s]...\n", (const char*)arg );#endif      (void)OpenBrowserWindow( arg, newWindow );      return;    }    // ok, let's try the -chrome argument    rv = args->GetCmdLineValue("-chrome", getter_Copies(arg));    if (NS_SUCCEEDED(rv) && (const char*)arg ) {      // Launch chrome.#if MOZ_DEBUG_DDE      printf( "Launching chrome url [%s]...\n", (const char*)arg );#endif      (void)OpenWindow( arg, "" );      return;    }    // try using the command line service to get the url    rv = HandleArbitraryStartup(args);    if (NS_SUCCEEDED(rv))      return;    // try for the "-kill" argument, to shut down the server    rv = args->GetCmdLineValue( "-kill", getter_Copies(arg));    if ( NS_SUCCEEDED(rv) && (const char*)arg ) {      // Turn off server mode.      nsCOMPtr<nsIAppShellService> appShell =        do_GetService( "@mozilla.org/appshell/appShellService;1", &rv);      if (NS_FAILED(rv)) return;            nsCOMPtr<nsINativeAppSupport> native;      rv = appShell->GetNativeAppSupport( getter_AddRefs( native ));      if (NS_SUCCEEDED(rv)) {        native->SetIsServerMode( PR_FALSE );        // This closes app if there are no top-level windows.        appShell->UnregisterTopLevelWindow( 0 );      }      return;    }    // ok, no idea what the param is. #if MOZ_DEBUG_DDE    printf( "Unknown request [%s]\n", (char*) request );#endif    // if all else fails, open a browser window    const char * const contractID =      "@mozilla.org/commandlinehandler/general-startup;1?type=browser";    nsCOMPtr<nsICmdLineHandler> handler = do_GetService(contractID, &rv);    if (NS_FAILED(rv)) return;          nsXPIDLString defaultArgs;    rv = handler->GetDefaultArgs(getter_Copies(defaultArgs));    if (NS_FAILED(rv) || !defaultArgs) return;          if (defaultArgs) {      nsCAutoString url;      url.AssignWithConversion( defaultArgs );      OpenBrowserWindow((const char*)url, newWindow);    } else {      OpenBrowserWindow("about:blank", newWindow);    }}