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

Unified Diff: src/base/utils/random-number-generator.cc

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/safe_conversions_impl.h ('k') | src/base/win32-math.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/utils/random-number-generator.cc
diff --git a/src/base/utils/random-number-generator.cc b/src/base/utils/random-number-generator.cc
index 4db190de49470cfd5d14b28d60ab3e4bc745c78a..be798111712c6abd72de1796dc0382cbe9633f76 100644
--- a/src/base/utils/random-number-generator.cc
+++ b/src/base/utils/random-number-generator.cc
@@ -45,9 +45,9 @@ RandomNumberGenerator::RandomNumberGenerator() {
// https://code.google.com/p/v8/issues/detail?id=2905
unsigned first_half, second_half;
errno_t result = rand_s(&first_half);
- ASSERT_EQ(0, result);
+ DCHECK_EQ(0, result);
result = rand_s(&second_half);
- ASSERT_EQ(0, result);
+ DCHECK_EQ(0, result);
SetSeed((static_cast<int64_t>(first_half) << 32) + second_half);
#else
// Gather entropy from /dev/urandom if available.
@@ -79,7 +79,7 @@ RandomNumberGenerator::RandomNumberGenerator() {
int RandomNumberGenerator::NextInt(int max) {
- ASSERT_LE(0, max);
+ DCHECK_LE(0, max);
// Fast path if max is a power of 2.
if (IS_POWER_OF_TWO(max)) {
@@ -110,8 +110,8 @@ void RandomNumberGenerator::NextBytes(void* buffer, size_t buflen) {
int RandomNumberGenerator::Next(int bits) {
- ASSERT_LT(0, bits);
- ASSERT_GE(32, bits);
+ DCHECK_LT(0, bits);
+ DCHECK_GE(32, bits);
// Do unsigned multiplication, which has the intended modulo semantics, while
// signed multiplication would expose undefined behavior.
uint64_t product = static_cast<uint64_t>(seed_) * kMultiplier;
« no previous file with comments | « src/base/safe_conversions_impl.h ('k') | src/base/win32-math.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698