Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: chrome/nacl/nacl_main.cc

Issue 7547002: Reenable the --enable-nacl-debug switch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/nacl/nacl_listener.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 platform.PlatformInitialize(); 112 platform.PlatformInitialize();
113 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); 113 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox);
114 platform.InitSandboxTests(no_sandbox); 114 platform.InitSandboxTests(no_sandbox);
115 115
116 if (!no_sandbox) { 116 if (!no_sandbox) {
117 platform.EnableSandbox(); 117 platform.EnableSandbox();
118 } 118 }
119 bool sandbox_test_result = platform.RunSandboxTests(); 119 bool sandbox_test_result = platform.RunSandboxTests();
120 120
121 if (sandbox_test_result) { 121 if (sandbox_test_result) {
122 bool debug = parsed_command_line.HasSwitch(switches::kEnableNaClDebug);
122 NaClListener listener; 123 NaClListener listener;
124 listener.set_debug_enabled(debug);
123 listener.Listen(); 125 listener.Listen();
124 } else { 126 } else {
125 // This indirectly prevents the test-harness-success-cookie from being set, 127 // This indirectly prevents the test-harness-success-cookie from being set,
126 // as a way of communicating test failure, because the nexe won't reply. 128 // as a way of communicating test failure, because the nexe won't reply.
127 // TODO(jvoung): find a better way to indicate failure that doesn't 129 // TODO(jvoung): find a better way to indicate failure that doesn't
128 // require waiting for a timeout. 130 // require waiting for a timeout.
129 VLOG(1) << "Sandbox test failed: Not launching NaCl process"; 131 VLOG(1) << "Sandbox test failed: Not launching NaCl process";
130 } 132 }
131 #else 133 #else
132 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc."; 134 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc.";
133 #endif 135 #endif
134 136
135 platform.PlatformUninitialize(); 137 platform.PlatformUninitialize();
136 return 0; 138 return 0;
137 } 139 }
OLDNEW
« no previous file with comments | « chrome/nacl/nacl_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698