summaryrefslogtreecommitdiffstats
path: root/chrome/nacl
diff options
context:
space:
mode:
authormseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-24 23:24:08 +0000
committermseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-24 23:24:08 +0000
commitbb8d4a5307c61a1dfdff49f9488dcd53f70e21b7 (patch)
tree5ffec80ef689f3928debfbe6539d139d6c3b5546 /chrome/nacl
parentd361a74bdd2e8f2e57cc301a01bcd5ed4dde4e8c (diff)
downloadchromium_src-bb8d4a5307c61a1dfdff49f9488dcd53f70e21b7.zip
chromium_src-bb8d4a5307c61a1dfdff49f9488dcd53f70e21b7.tar.gz
chromium_src-bb8d4a5307c61a1dfdff49f9488dcd53f70e21b7.tar.bz2
NaCl: Allow nacl64.exe's stdout/stderr to be sent to the Windows console
This brings 64-bit NaCl processes (both the broker and nacl-loader) into line with other Chromium subprocesses. Passing "--enable-logging" will cause stdout/stderr to be sent to the Windows console, if chrome.exe/browser_tests.exe is running under a Windows console. This involves duplicating some code from content/app/content_main_runner.cc. Note that this does not make stdout/stderr work when Chromium is running under Buildbot or Cygwin's default terminal (mintty). BUG=171836 TEST=Run NaClBrowserTestNewlib.ExitStatus (browser_tests) and see the log message "Native Client module will be loaded at base address 0x..." on the console Review URL: https://codereview.chromium.org/12035082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl')
-rw-r--r--chrome/nacl/nacl_exe_win_64.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/nacl/nacl_exe_win_64.cc b/chrome/nacl/nacl_exe_win_64.cc
index 9184d9c..0a3f9e4 100644
--- a/chrome/nacl/nacl_exe_win_64.cc
+++ b/chrome/nacl/nacl_exe_win_64.cc
@@ -59,6 +59,9 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
base::EnableTerminationOnOutOfMemory();
content::RegisterInvalidParamHandler();
content::SetupCRT(command_line);
+ // Route stdio to parent console (if any) or create one.
+ if (command_line.HasSwitch(switches::kEnableLogging))
+ base::RouteStdioToConsole();
// Initialize the sandbox for this process.
bool sandbox_initialized_ok = content::InitializeSandbox(&sandbox_info);