OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 547 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
548 g_fds->Set(kCrashDumpSignal, | 548 g_fds->Set(kCrashDumpSignal, |
549 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); | 549 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); |
550 #endif | 550 #endif |
551 | 551 |
552 #endif // !OS_WIN | 552 #endif // !OS_WIN |
553 | 553 |
554 is_initialized_ = true; | 554 is_initialized_ = true; |
555 delegate_ = params.delegate; | 555 delegate_ = params.delegate; |
556 | 556 |
557 base::EnableTerminationOnHeapCorruption(); | 557 if (params.enable_termination_on_heap_corruption) |
558 base::EnableTerminationOnHeapCorruption(); | |
grt (UTC plus 2)
2014/07/30 21:05:11
if it's okay for this to happen on line 574 instea
| |
558 base::EnableTerminationOnOutOfMemory(); | 559 base::EnableTerminationOnOutOfMemory(); |
559 | 560 |
560 // The exit manager is in charge of calling the dtors of singleton objects. | 561 // The exit manager is in charge of calling the dtors of singleton objects. |
561 // On Android, AtExitManager is set up when library is loaded. | 562 // On Android, AtExitManager is set up when library is loaded. |
562 // On iOS, it's set up in main(), which can't call directly through to here. | 563 // On iOS, it's set up in main(), which can't call directly through to here. |
563 // A consequence of this is that you can't use the ctor/dtor-based | 564 // A consequence of this is that you can't use the ctor/dtor-based |
564 // TRACE_EVENT methods on Linux or iOS builds till after we set this up. | 565 // TRACE_EVENT methods on Linux or iOS builds till after we set this up. |
565 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 566 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
566 if (!ui_task_) { | 567 if (!ui_task_) { |
567 // When running browser tests, don't create a second AtExitManager as that | 568 // When running browser tests, don't create a second AtExitManager as that |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
818 | 819 |
819 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 820 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
820 }; | 821 }; |
821 | 822 |
822 // static | 823 // static |
823 ContentMainRunner* ContentMainRunner::Create() { | 824 ContentMainRunner* ContentMainRunner::Create() { |
824 return new ContentMainRunnerImpl(); | 825 return new ContentMainRunnerImpl(); |
825 } | 826 } |
826 | 827 |
827 } // namespace content | 828 } // namespace content |
OLD | NEW |