Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: chrome/app/chrome_main.cc

Issue 402723002: Experimentally disable termination on heap corrruption in order to measure the contribution of this… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "content/public/app/content_main.h" 7 #include "content/public/app/content_main.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include "base/win/win_util.h" 10 #include "base/win/win_util.h"
11 #include "chrome/common/terminate_on_heap_corruption_experiment_win.h"
11 12
12 #define DLLEXPORT __declspec(dllexport) 13 #define DLLEXPORT __declspec(dllexport)
13 14
14 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. 15 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling.
15 extern "C" { 16 extern "C" {
16 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, 17 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
17 sandbox::SandboxInterfaceInfo* sandbox_info); 18 sandbox::SandboxInterfaceInfo* sandbox_info);
18 } 19 }
19 #elif defined(OS_POSIX) 20 #elif defined(OS_POSIX)
20 extern "C" { 21 extern "C" {
(...skipping 10 matching lines...) Expand all
31 #endif 32 #endif
32 ChromeMainDelegate chrome_main_delegate; 33 ChromeMainDelegate chrome_main_delegate;
33 content::ContentMainParams params(&chrome_main_delegate); 34 content::ContentMainParams params(&chrome_main_delegate);
34 35
35 #if defined(OS_WIN) 36 #if defined(OS_WIN)
36 // The process should crash when going through abnormal termination. 37 // The process should crash when going through abnormal termination.
37 base::win::SetShouldCrashOnProcessDetach(true); 38 base::win::SetShouldCrashOnProcessDetach(true);
38 base::win::SetAbortBehaviorForCrashReporting(); 39 base::win::SetAbortBehaviorForCrashReporting();
39 params.instance = instance; 40 params.instance = instance;
40 params.sandbox_info = sandbox_info; 41 params.sandbox_info = sandbox_info;
42
43 params.disable_termination_on_heap_corruption =
44 ShouldExperimentallyDisableTerminateOnHeapCorruption();
41 #else 45 #else
42 params.argc = argc; 46 params.argc = argc;
43 params.argv = argv; 47 params.argv = argv;
44 #endif 48 #endif
45 49
46 int rv = content::ContentMain(params); 50 int rv = content::ContentMain(params);
47 51
48 #if defined(OS_WIN) 52 #if defined(OS_WIN)
49 base::win::SetShouldCrashOnProcessDetach(false); 53 base::win::SetShouldCrashOnProcessDetach(false);
50 #endif 54 #endif
51 55
52 return rv; 56 return rv;
53 } 57 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_win.cc » ('j') | content/public/app/content_main.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698