Bug 660529 Remove useless use of PromiseFlatString r=kaie
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Mon, 04 Jul 2011 22:06:24 +0100
changeset 72316 320e5abc6f5aeb067b537f9b357c81dbd00d8751
parent 72315 ca5dd1bd60f3030d39d9b4946506a5bd13cf189c
child 72317 c3e051b9da9c841a8283bc1c73c7300a01f21ab5
push id411
push usermak77@bonardo.net
push dateTue, 05 Jul 2011 08:47:59 +0000
treeherdermozilla-inbound@8eef7a6683f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaie
bugs660529
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 660529 Remove useless use of PromiseFlatString r=kaie
security/manager/pki/src/nsNSSDialogs.cpp
--- a/security/manager/pki/src/nsNSSDialogs.cpp
+++ b/security/manager/pki/src/nsNSSDialogs.cpp
@@ -630,25 +630,21 @@ nsNSSDialogs::ShowCertError(nsIInterface
 
   nsCOMPtr<nsIDialogParamBlock> dialogBlock = do_QueryInterface(block);
 
   nsresult rv;
   rv = dialogBlock->SetInt(1, portNumber);
   if (NS_FAILED(rv))
     return rv; 
 
-  NS_ConvertUTF8toUTF16 host16(hostName);
-  nsPromiseFlatString flatHostName(host16);
-  nsPromiseFlatString flatMessage(textErrorMessage);
-
-  rv = dialogBlock->SetString(1, flatHostName.get());
+  rv = dialogBlock->SetString(1, NS_ConvertUTF8toUTF16(hostName).get());
   if (NS_FAILED(rv))
     return rv;
   
-  rv = dialogBlock->SetString(2, flatMessage.get());
+  rv = dialogBlock->SetString(2, PromiseFlatString(textErrorMessage).get());
   if (NS_FAILED(rv))
     return rv;
   
   rv = block->SetISupportAtIndex(1, cert);
   if (NS_FAILED(rv))
     return rv;
 
   rv = nsNSSDialogHelper::openDialog(nsnull,