summaryrefslogtreecommitdiffstats
path: root/content/public/app
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 19:23:09 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 19:23:09 +0000
commit83882d4c9ff45afb3f2de79fcab483ec0b7d2e73 (patch)
treec38b8bb648174547679a729126ecf3c37f4f0443 /content/public/app
parent6fc6855b48a1da2ece8a38591d6db392d60b6009 (diff)
downloadchromium_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/public/app')
-rw-r--r--content/public/app/content_main.h3
-rw-r--r--content/public/app/content_main_delegate.cc4
-rw-r--r--content/public/app/content_main_delegate.h7
3 files changed, 11 insertions, 3 deletions
diff --git a/content/public/app/content_main.h b/content/public/app/content_main.h
index f3ead71..201fca7 100644
--- a/content/public/app/content_main.h
+++ b/content/public/app/content_main.h
@@ -25,7 +25,6 @@ class ContentMainDelegate;
struct ContentMainParams {
explicit ContentMainParams(ContentMainDelegate* delegate)
: delegate(delegate),
- enable_termination_on_heap_corruption(true),
#if defined(OS_WIN)
instance(NULL),
sandbox_info(NULL),
@@ -38,8 +37,6 @@ struct ContentMainParams {
ContentMainDelegate* delegate;
- bool enable_termination_on_heap_corruption;
-
#if defined(OS_WIN)
HINSTANCE instance;
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
index 433300c..498bc86 100644
--- a/content/public/app/content_main_delegate.cc
+++ b/content/public/app/content_main_delegate.cc
@@ -48,6 +48,10 @@ void ContentMainDelegate::ZygoteStarting(
#endif
+bool ContentMainDelegate::ShouldEnableTerminationOnHeapCorruption() {
+ return true;
+}
+
ContentBrowserClient* ContentMainDelegate::CreateContentBrowserClient() {
#if defined(CHROME_MULTIPLE_DLL_CHILD)
return NULL;
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index 6191d78..6273950 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -76,6 +76,13 @@ class CONTENT_EXPORT ContentMainDelegate {
virtual void ZygoteForked() {}
#endif // OS_MACOSX
+ // Allows the embedder to disable termination on heap corruption.
+ // This is being used to measure the impact of this feature on crash reports.
+ // Termination on heap corruption is enabled by default.
+ // TODO(erikwright): Remove this by September 2014 when experimentation is
+ // complete.
+ virtual bool ShouldEnableTerminationOnHeapCorruption();
+
protected:
friend class ContentClientInitializer;