Index: content/app/content_main_runner.cc |
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
index 3b5f88ad7b58b76de4d0aed66959c37b6a70758f..037c79bd512ed948ee71b560b89076cdbf2300fb 100644 |
--- a/content/app/content_main_runner.cc |
+++ b/content/app/content_main_runner.cc |
@@ -10,6 +10,7 @@ |
#include <string> |
#include <utility> |
+#include "base/allocator/allocator_check.h" |
#include "base/allocator/allocator_extension.h" |
#include "base/at_exit.h" |
#include "base/command_line.h" |
@@ -654,6 +655,12 @@ class ContentMainRunnerImpl : public ContentMainRunner { |
base::win::SetupCRT(command_line); |
#endif |
+ // If we are on a platform where the default allocator is overridden (shim |
+ // layer on windows, tcmalloc on Linux Desktop) smoke-tests that the |
+ // overriding logic is working correctly. If not causes a hard crash, as its |
+ // unexpected absence has security implications. |
+ CHECK(base::allocator::IsAllocatorInitialized()); |
+ |
#if defined(OS_POSIX) |
if (!process_type.empty()) { |
// When you hit Ctrl-C in a terminal running the browser |