summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorprimiano <primiano@chromium.org>2016-02-10 14:18:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-10 22:19:18 +0000
commite9da717d1cd3fd4b41b04456b9e454c5c028cac3 (patch)
tree706c3f443c8ec4f1daa4dd74e8e033c8c4d52b09 /base
parent865654e1585b6ee31884ae909eaec9385d779204 (diff)
downloadchromium_src-e9da717d1cd3fd4b41b04456b9e454c5c028cac3.zip
chromium_src-e9da717d1cd3fd4b41b04456b9e454c5c028cac3.tar.gz
chromium_src-e9da717d1cd3fd4b41b04456b9e454c5c028cac3.tar.bz2
Allocator cleanup: remove reundant tc_set_new_mode in ProcessMemoryTest
Leftover from the previous cleanups. Previously, when base did pretend to not know anything about allocator, tc_set_new_mode was invoked by the content layer (in content_main). But this required this base unittest to mimic the same content behavior. These days, instead, tc_set_new_mode() is called by base's EnableTerminationOnOutOfMemory(). This test is already invoking EnableTerminationOnOutOfMemory() in its initialization, so there is no need to perform a 2nd call to tc_set_new_mode. Also this makes the code in this test conceptually cleaner and smaller. BUG=564618 TEST=base_unittests Review URL: https://codereview.chromium.org/1683153002 Cr-Commit-Position: refs/heads/master@{#374750}
Diffstat (limited to 'base')
-rw-r--r--base/process/memory_unittest.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/base/process/memory_unittest.cc b/base/process/memory_unittest.cc
index 6137c1c..c4728c5 100644
--- a/base/process/memory_unittest.cc
+++ b/base/process/memory_unittest.cc
@@ -148,12 +148,6 @@ TEST(ProcessMemoryTest, MacTerminateOnHeapCorruption) {
!(defined(OS_WIN) && !defined(ALLOCATOR_SHIM)) && \
!defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
-#if defined(USE_TCMALLOC)
-extern "C" {
-int tc_set_new_mode(int mode);
-}
-#endif // defined(USE_TCMALLOC)
-
namespace {
const char *kOomRegex = "Out of memory";
} // namespace
@@ -171,12 +165,6 @@ class OutOfMemoryTest : public testing::Test {
signed_test_size_(std::numeric_limits<ssize_t>::max()) {
}
-#if defined(USE_TCMALLOC)
- void SetUp() override { tc_set_new_mode(1); }
-
- void TearDown() override { tc_set_new_mode(0); }
-#endif // defined(USE_TCMALLOC)
-
protected:
void* value_;
size_t test_size_;