| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include <assert.h> | 7 #include <assert.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 command->insert(command->end(), sel_ldr_argv_.begin(), sel_ldr_argv_.end()); | 254 command->insert(command->end(), sel_ldr_argv_.begin(), sel_ldr_argv_.end()); |
| 255 | 255 |
| 256 // Our use of "environ" above fails to link in the "shared" (DLL) | 256 // Our use of "environ" above fails to link in the "shared" (DLL) |
| 257 // build of Chromium on Windows. However, we do not use | 257 // build of Chromium on Windows. However, we do not use |
| 258 // BuildCommandLine() when integrated into Chromium anyway -- we use | 258 // BuildCommandLine() when integrated into Chromium anyway -- we use |
| 259 // sel_main_chrome.c -- so it is safe to disable this code, which is | 259 // sel_main_chrome.c -- so it is safe to disable this code, which is |
| 260 // largely for debugging. | 260 // largely for debugging. |
| 261 // TODO(mseaborn): Tidy this up so that we do not need a conditional. | 261 // TODO(mseaborn): Tidy this up so that we do not need a conditional. |
| 262 #ifdef NACL_STANDALONE | 262 #ifdef NACL_STANDALONE |
| 263 struct NaClEnvCleanser env_cleanser; | 263 struct NaClEnvCleanser env_cleanser; |
| 264 NaClEnvCleanserCtor(&env_cleanser); | 264 NaClEnvCleanserCtor(&env_cleanser, 1); |
| 265 if (!NaClEnvCleanserInit(&env_cleanser, GetEnviron())) { | 265 if (!NaClEnvCleanserInit(&env_cleanser, GetEnviron(), NULL)) { |
| 266 NaClLog(LOG_FATAL, "Failed to initialise env cleanser\n"); | 266 NaClLog(LOG_FATAL, "Failed to initialise env cleanser\n"); |
| 267 } | 267 } |
| 268 for (const char* const* env = NaClEnvCleanserEnvironment(&env_cleanser); | 268 for (const char* const* env = NaClEnvCleanserEnvironment(&env_cleanser); |
| 269 *env != NULL; | 269 *env != NULL; |
| 270 ++env) { | 270 ++env) { |
| 271 command->push_back("-E"); | 271 command->push_back("-E"); |
| 272 command->push_back(*env); | 272 command->push_back(*env); |
| 273 } | 273 } |
| 274 NaClEnvCleanserDtor(&env_cleanser); | 274 NaClEnvCleanserDtor(&env_cleanser); |
| 275 #endif | 275 #endif |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 CHECK(factory_ != NULL); | 311 CHECK(factory_ != NULL); |
| 312 return factory_->MakeGeneric(raw_desc); | 312 return factory_->MakeGeneric(raw_desc); |
| 313 } | 313 } |
| 314 | 314 |
| 315 DescWrapper* SelLdrLauncher::WrapCleanup(NaClDesc* raw_desc) { | 315 DescWrapper* SelLdrLauncher::WrapCleanup(NaClDesc* raw_desc) { |
| 316 CHECK(factory_ != NULL); | 316 CHECK(factory_ != NULL); |
| 317 return factory_->MakeGenericCleanup(raw_desc); | 317 return factory_->MakeGenericCleanup(raw_desc); |
| 318 } | 318 } |
| 319 | 319 |
| 320 } // namespace nacl | 320 } // namespace nacl |
| OLD | NEW |