diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-01 19:23:09 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-01 19:23:09 +0000 |
commit | 83882d4c9ff45afb3f2de79fcab483ec0b7d2e73 (patch) | |
tree | c38b8bb648174547679a729126ecf3c37f4f0443 /content/app/content_main_runner.cc | |
parent | 6fc6855b48a1da2ece8a38591d6db392d60b6009 (diff) | |
download | chromium_src-83882d4c9ff45afb3f2de79fcab483ec0b7d2e73.zip chromium_src-83882d4c9ff45afb3f2de79fcab483ec0b7d2e73.tar.gz chromium_src-83882d4c9ff45afb3f2de79fcab483ec0b7d2e73.tar.bz2 |
Configure termination-on-heap-corruption using a delegate method rather than a parameter, in order to defer calculating the value until after the AtExitManager is initialized.
BUG=398747
Review URL: https://codereview.chromium.org/434533005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287069 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app/content_main_runner.cc')
-rw-r--r-- | content/app/content_main_runner.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index d2301c8..a002013 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -554,10 +554,6 @@ class ContentMainRunnerImpl : public ContentMainRunner { is_initialized_ = true; delegate_ = params.delegate; - if (params.enable_termination_on_heap_corruption) - base::EnableTerminationOnHeapCorruption(); - base::EnableTerminationOnOutOfMemory(); - // The exit manager is in charge of calling the dtors of singleton objects. // On Android, AtExitManager is set up when library is loaded. // On iOS, it's set up in main(), which can't call directly through to here. @@ -595,6 +591,10 @@ class ContentMainRunnerImpl : public ContentMainRunner { CommandLine::Init(argc, argv); + if (!delegate_ || delegate_->ShouldEnableTerminationOnHeapCorruption()) + base::EnableTerminationOnHeapCorruption(); + base::EnableTerminationOnOutOfMemory(); + #if !defined(OS_IOS) SetProcessTitleFromCommandLine(argv); #endif |