Bug 718357 - Do not use new console when browser restarts on Windows. r=jimm
authorBrian R. Bondy <netzen@gmail.com>
Thu, 19 Jan 2012 16:30:05 -0500
changeset 84957 d0eed1fd4272f7559db1ed5b1bdc503143bc442e
parent 84956 3a322365e2d4cdd821207612be5b59fcb55d4955
child 84958 26998c1affd1e787ea00b330a68e5edee8ee635d
push id21888
push userbmo@edmorley.co.uk
push dateSat, 21 Jan 2012 02:32:50 +0000
treeherdermozilla-central@099ec081e8aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs718357
milestone12.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 718357 - Do not use new console when browser restarts on Windows. r=jimm
toolkit/xre/nsWindowsRestart.cpp
--- a/toolkit/xre/nsWindowsRestart.cpp
+++ b/toolkit/xre/nsWindowsRestart.cpp
@@ -260,27 +260,23 @@ WinLaunchChild(const PRUnichar *exePath,
     return FALSE;
   }
 
   STARTUPINFOW si = {0};
   si.cb = sizeof(STARTUPINFOW);
   si.lpDesktop = L"winsta0\\Default";
   PROCESS_INFORMATION pi = {0};
 
-  DWORD creationFlags = 0;
-#ifdef DEBUG
-  creationFlags |= CREATE_NEW_CONSOLE;
-#endif
   if (userToken == NULL) {
     ok = CreateProcessW(exePath,
                         cl,
                         NULL,  // no special security attributes
                         NULL,  // no special thread attributes
                         FALSE, // don't inherit filehandles
-                        creationFlags,
+                        0,     // creation flags
                         NULL,  // inherit my environment
                         NULL,  // use my current directory
                         &si,
                         &pi);
   } else {
     // Create an environment block for the process we're about to start using
     // the user's token.
     LPVOID environmentBlock = NULL;
@@ -289,21 +285,17 @@ WinLaunchChild(const PRUnichar *exePath,
     }
 
     ok = CreateProcessAsUserW(userToken, 
                               exePath,
                               cl,
                               NULL,  // no special security attributes
                               NULL,  // no special thread attributes
                               FALSE, // don't inherit filehandles
-                              CREATE_DEFAULT_ERROR_MODE |
-#ifdef DEBUG
-                              CREATE_NEW_CONSOLE |
-#endif
-                              CREATE_UNICODE_ENVIRONMENT,                              
+                              0,     // creation flags
                               environmentBlock,
                               NULL,  // use my current directory
                               &si,
                               &pi);
 
     if (environmentBlock) {
       DestroyEnvironmentBlock(environmentBlock);
     }