OLD | NEW |
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 "content/app/content_main.h" | 5 #include "content/app/content_main.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 307 |
308 // Set C library locale to make sure CommandLine can parse argument values | 308 // Set C library locale to make sure CommandLine can parse argument values |
309 // in correct encoding. | 309 // in correct encoding. |
310 setlocale(LC_ALL, ""); | 310 setlocale(LC_ALL, ""); |
311 | 311 |
312 SetupSignalHandlers(); | 312 SetupSignalHandlers(); |
313 | 313 |
314 base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); | 314 base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); |
315 g_fds->Set(kPrimaryIPCChannel, | 315 g_fds->Set(kPrimaryIPCChannel, |
316 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); | 316 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); |
317 #if defined(OS_LINUX) | 317 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
318 g_fds->Set(kCrashDumpSignal, | 318 g_fds->Set(kCrashDumpSignal, |
319 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); | 319 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); |
320 #endif | 320 #endif |
321 | 321 |
322 #endif // OS_WIN | 322 #endif // OS_WIN |
323 | 323 |
324 base::EnableTerminationOnHeapCorruption(); | 324 base::EnableTerminationOnHeapCorruption(); |
325 base::EnableTerminationOnOutOfMemory(); | 325 base::EnableTerminationOnOutOfMemory(); |
326 | 326 |
327 // The exit manager is in charge of calling the dtors of singleton objects. | 327 // The exit manager is in charge of calling the dtors of singleton objects. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 _CrtDumpMemoryLeaks(); | 457 _CrtDumpMemoryLeaks(); |
458 #endif // _CRTDBG_MAP_ALLOC | 458 #endif // _CRTDBG_MAP_ALLOC |
459 | 459 |
460 _Module.Term(); | 460 _Module.Term(); |
461 #endif // OS_WIN | 461 #endif // OS_WIN |
462 | 462 |
463 return exit_code; | 463 return exit_code; |
464 } | 464 } |
465 | 465 |
466 } // namespace content | 466 } // namespace content |
OLD | NEW |