diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 03:06:12 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 03:06:12 +0000 |
commit | 2f4a8e1220d91ba95c2c46ec232dd53d27807ecd (patch) | |
tree | a353800ca5728e7c26423af7cccedf9812404d9a /base/allocator | |
parent | 27488c22fe34d431fa34576032d8a0fc92b61572 (diff) | |
download | chromium_src-2f4a8e1220d91ba95c2c46ec232dd53d27807ecd.zip chromium_src-2f4a8e1220d91ba95c2c46ec232dd53d27807ecd.tar.gz chromium_src-2f4a8e1220d91ba95c2c46ec232dd53d27807ecd.tar.bz2 |
Revert 107042 - Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.
I tried hard not to change CHECKs that had side effects. I kept fatal checks
that seemed security or debugging-info (in crash reports) sensitive, and ones
that seems particularly well-conceived.
Review URL: http://codereview.chromium.org/8368009
TBR=brettw@chromium.org
Review URL: http://codereview.chromium.org/8351025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/allocator')
-rw-r--r-- | base/allocator/allocator_shim.cc | 2 | ||||
-rw-r--r-- | base/allocator/allocator_unittests.cc | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc index 97bbf90..b7973e8 100644 --- a/base/allocator/allocator_shim.cc +++ b/base/allocator/allocator_shim.cc @@ -297,7 +297,7 @@ void SetupSubprocessAllocator() { char* secondary_value = secondary_length ? buffer : "TCMALLOC"; // Force renderer (or other subprocesses) to use secondary_value. int ret_val = _putenv_s(primary_name, secondary_value); - DCHECK_EQ(0, ret_val); + CHECK_EQ(0, ret_val); } #endif // ENABLE_DYNAMIC_ALLOCATOR_SWITCHING } diff --git a/base/allocator/allocator_unittests.cc b/base/allocator/allocator_unittests.cc index d6556ce..d935cf9 100644 --- a/base/allocator/allocator_unittests.cc +++ b/base/allocator/allocator_unittests.cc @@ -398,16 +398,16 @@ TEST(Allocators, Realloc1) { for (int s = 0; s < sizeof(start_sizes)/sizeof(*start_sizes); ++s) { void* p = malloc(start_sizes[s]); - ASSERT_TRUE(p); + CHECK(p); // The larger the start-size, the larger the non-reallocing delta. for (int d = 0; d < s*2; ++d) { void* new_p = realloc(p, start_sizes[s] + deltas[d]); - ASSERT_EQ(p, new_p); // realloc should not allocate new memory + CHECK_EQ(p, new_p); // realloc should not allocate new memory } // Test again, but this time reallocing smaller first. for (int d = 0; d < s*2; ++d) { void* new_p = realloc(p, start_sizes[s] - deltas[d]); - ASSERT_EQ(p, new_p); // realloc should not allocate new memory + CHECK_EQ(p, new_p); // realloc should not allocate new memory } free(p); } |