Bug 1563514: Use wide strings when launching with a new profile. r=mconley
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 09 Jul 2019 18:10:24 +0000
changeset 481972 af369a5fc700b13d98937040576ffa45c6209c60
parent 481971 03fe4de2ed94664a7100ccfca5ab9a0f57981a7c
child 481973 88f4378ccf1ab720dea4470b21a9ba5c8dd22404
push id113647
push useraciure@mozilla.com
push dateWed, 10 Jul 2019 09:46:39 +0000
treeherdermozilla-inbound@f3a387c13e2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1563514
milestone70.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 1563514: Use wide strings when launching with a new profile. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D37307
toolkit/components/startup/nsAppStartup.cpp
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -988,16 +988,18 @@ nsAppStartup::CreateInstanceWithProfile(
   }
 
   nsAutoCString profileName;
   rv = aProfile->GetName(profileName);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
-  const char* args[] = {"-no-remote", "-P", profileName.get()};
-  rv = process->Run(false, args, 3);
+  NS_ConvertUTF8toUTF16 wideName(profileName);
+
+  const char16_t* args[] = {u"-no-remote", u"-P", wideName.get()};
+  rv = process->Runw(false, args, 3);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   return NS_OK;
 }