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

Side by Side Diff: content/app/content_main_runner.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 "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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 #if defined(OS_LINUX) || defined(OS_OPENBSD) 550 #if defined(OS_LINUX) || defined(OS_OPENBSD)
551 g_fds->Set(kCrashDumpSignal, 551 g_fds->Set(kCrashDumpSignal,
552 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); 552 kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor);
553 #endif 553 #endif
554 554
555 #endif // !OS_WIN 555 #endif // !OS_WIN
556 556
557 is_initialized_ = true; 557 is_initialized_ = true;
558 delegate_ = params.delegate; 558 delegate_ = params.delegate;
559 559
560 base::EnableTerminationOnHeapCorruption(); 560 if (!params.disable_termination_on_heap_corruption)
561 base::EnableTerminationOnHeapCorruption();
561 base::EnableTerminationOnOutOfMemory(); 562 base::EnableTerminationOnOutOfMemory();
562 563
563 // The exit manager is in charge of calling the dtors of singleton objects. 564 // The exit manager is in charge of calling the dtors of singleton objects.
564 // On Android, AtExitManager is set up when library is loaded. 565 // On Android, AtExitManager is set up when library is loaded.
565 // On iOS, it's set up in main(), which can't call directly through to here. 566 // On iOS, it's set up in main(), which can't call directly through to here.
566 // A consequence of this is that you can't use the ctor/dtor-based 567 // A consequence of this is that you can't use the ctor/dtor-based
567 // TRACE_EVENT methods on Linux or iOS builds till after we set this up. 568 // TRACE_EVENT methods on Linux or iOS builds till after we set this up.
568 #if !defined(OS_ANDROID) && !defined(OS_IOS) 569 #if !defined(OS_ANDROID) && !defined(OS_IOS)
569 if (!ui_task_) { 570 if (!ui_task_) {
570 // When running browser tests, don't create a second AtExitManager as that 571 // When running browser tests, don't create a second AtExitManager as that
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 822
822 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 823 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
823 }; 824 };
824 825
825 // static 826 // static
826 ContentMainRunner* ContentMainRunner::Create() { 827 ContentMainRunner* ContentMainRunner::Create() {
827 return new ContentMainRunnerImpl(); 828 return new ContentMainRunnerImpl();
828 } 829 }
829 830
830 } // namespace content 831 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698