if (NS_SUCCEEDED(rv)) { *windowOpened = PR_TRUE; }
nsresult LaunchApplication(const char *aParam, PRInt32 height, PRInt32 width){  nsresult rv = NS_OK;  nsCOMPtr <nsICmdLineService> cmdLine =    do_GetService("@mozilla.org/appshell/commandLineService;1", &rv);  if (NS_FAILED(rv)) return rv;  nsCOMPtr <nsICmdLineHandler> handler;  rv = cmdLine->GetHandlerForParam(aParam, getter_AddRefs(handler));  if (NS_FAILED(rv)) return rv;  nsXPIDLCString chromeUrlForTask;  rv = handler->GetChromeUrlForTask(getter_Copies(chromeUrlForTask));  if (NS_FAILED(rv)) return rv;  PRBool handlesArgs = PR_FALSE;  rv = handler->GetHandlesArgs(&handlesArgs);  if (handlesArgs) {    nsXPIDLString defaultArgs;    rv = handler->GetDefaultArgs(getter_Copies(defaultArgs));    if (NS_FAILED(rv)) return rv;    rv = OpenWindow(chromeUrlForTask, defaultArgs);  }  else {    rv = OpenWindow(chromeUrlForTask, width, height);  }  return rv;}