PRINTF("OpenWindow(%s,?)\n",urlstr);
static nsresult OpenWindow( const char*urlstr, const PRUnichar *args ){#ifdef DEBUG_CMD_LINE  printf("OpenWindow(%s,?)\n",urlstr);#endif /* DEBUG_CMD_LINE */  nsresult rv;  nsCOMPtr<nsIAppShellService> appShellService = do_GetService(kAppShellServiceCID, &rv);    if (NS_SUCCEEDED(rv)) {      nsCOMPtr<nsIDOMWindowInternal> hiddenWindow;      JSContext *jsContext;      rv = appShellService->GetHiddenWindowAndJSContext(getter_AddRefs(hiddenWindow),                                                         &jsContext);      if (NS_SUCCEEDED(rv)) {        void *stackPtr;        jsval *argv = JS_PushArguments( jsContext,                                        &stackPtr,                                        "sssW",                                        urlstr,                                        "_blank",                                        "chrome,dialog=no,all",                                        args );        if( argv ) {          nsCOMPtr<nsIDOMWindowInternal> newWindow;          rv = hiddenWindow->OpenDialog( jsContext,                                         argv,                                         4,                                         getter_AddRefs( newWindow ) );          JS_PopArguments( jsContext, stackPtr );        }      }    }  return rv;}