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

Unified Diff: Source/wtf/dtoa/cached-powers.cc

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/WeakPtr.h ('k') | Source/wtf/text/ASCIIFastPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/dtoa/cached-powers.cc
diff --git a/Source/wtf/dtoa/cached-powers.cc b/Source/wtf/dtoa/cached-powers.cc
index d7a8ab73fe0b402ada832e89b86e90a702668543..eaa1c21319f6d2008fb449585e5a06becc82d9f8 100644
--- a/Source/wtf/dtoa/cached-powers.cc
+++ b/Source/wtf/dtoa/cached-powers.cc
@@ -140,10 +140,8 @@ namespace double_conversion {
const int PowersOfTenCache::kMinDecimalExponent = -348; // kCachedPowers[0].decimal_exponent
const int PowersOfTenCache::kMaxDecimalExponent = 340; // kCachedPowers[kCachedPowersLength - 1].decimal_exponent
-#ifndef NDEBUG
#if ENABLE(ASSERT)
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
-#endif
// Check that the static constants match the values in kCachedPowers.
static void validateStaticConstants() {
@@ -159,7 +157,7 @@ namespace double_conversion {
int max_exponent,
DiyFp* power,
int* decimal_exponent) {
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
validateStaticConstants();
#endif
int kQ = DiyFp::kSignificandSize;
@@ -181,7 +179,7 @@ namespace double_conversion {
int* found_exponent) {
ASSERT(kMinDecimalExponent <= requested_exponent);
ASSERT(requested_exponent < kMaxDecimalExponent + kDecimalExponentDistance);
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
validateStaticConstants();
#endif
int index =
« no previous file with comments | « Source/wtf/WeakPtr.h ('k') | Source/wtf/text/ASCIIFastPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698