summaryrefslogtreecommitdiffstats
path: root/chrome/nacl/nacl_main.cc
diff options
context:
space:
mode:
authornoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 22:55:28 +0000
committernoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 22:55:28 +0000
commita63736b3293cec5d2f1ad3588dc15aa54ae74c6b (patch)
tree822afb79561c2986d55bbd8171971f504dcf4f7b /chrome/nacl/nacl_main.cc
parentd4799a3bf70ecc62ab702150cae1d1e925b14938 (diff)
downloadchromium_src-a63736b3293cec5d2f1ad3588dc15aa54ae74c6b.zip
chromium_src-a63736b3293cec5d2f1ad3588dc15aa54ae74c6b.tar.gz
chromium_src-a63736b3293cec5d2f1ad3588dc15aa54ae74c6b.tar.bz2
Update the interface between Chrome and sel_main_chrome. Added a debug flag in the nacl_thread class.
Moved static LaunchNaClChildProcess inline since we need access to variables from the single caller. BUG=http://code.google.com/p/nativeclient/issues/detail?id=728 TEST=none Test to be added to NaCl integration bots. Review URL: http://codereview.chromium.org/3527001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl/nacl_main.cc')
-rw-r--r--chrome/nacl/nacl_main.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc
index 24d8b1d..4477494 100644
--- a/chrome/nacl/nacl_main.cc
+++ b/chrome/nacl/nacl_main.cc
@@ -88,12 +88,6 @@ static void HandleNaClTestParameters(const CommandLine& command_line) {
}
}
-static void LaunchNaClChildProcess() {
- ChildProcess nacl_process;
- nacl_process.set_main_thread(new NaClThread());
- MessageLoop::current()->Run();
-}
-
// main() routine for the NaCl loader process.
int NaClMain(const MainFunctionParams& parameters) {
const CommandLine& parsed_command_line = parameters.command_line_;
@@ -124,7 +118,10 @@ int NaClMain(const MainFunctionParams& parameters) {
bool sandbox_test_result = platform.RunSandboxTests();
if (sandbox_test_result) {
- LaunchNaClChildProcess();
+ ChildProcess nacl_process;
+ bool debug = parsed_command_line.HasSwitch(switches::kEnableNaClDebug);
+ nacl_process.set_main_thread(new NaClThread(debug));
+ MessageLoop::current()->Run();
} else {
// This indirectly prevents the test-harness-success-cookie from being set,
// as a way of communicating test failure, because the nexe won't reply.