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

Unified Diff: src/base/platform/platform-cygwin.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/platform/platform.h ('k') | src/base/platform/platform-freebsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/platform-cygwin.cc
diff --git a/src/base/platform/platform-cygwin.cc b/src/base/platform/platform-cygwin.cc
index b91e31b95e5d3a91b7749e54bf26c0d58e5622f0..d93439bf144960b82a89a436845ee1ea7ba14bc2 100644
--- a/src/base/platform/platform-cygwin.cc
+++ b/src/base/platform/platform-cygwin.cc
@@ -38,9 +38,9 @@ const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
double OS::LocalTimeOffset(TimezoneCache* cache) {
// On Cygwin, struct tm does not contain a tm_gmtoff field.
time_t utc = time(NULL);
- ASSERT(utc != -1);
+ DCHECK(utc != -1);
struct tm* loc = localtime(&utc);
- ASSERT(loc != NULL);
+ DCHECK(loc != NULL);
// time - localtime includes any daylight savings offset, so subtract it.
return static_cast<double>((mktime(loc) - utc) * msPerSecond -
(loc->tm_isdst > 0 ? 3600 * msPerSecond : 0));
@@ -205,7 +205,7 @@ VirtualMemory::VirtualMemory(size_t size)
VirtualMemory::VirtualMemory(size_t size, size_t alignment)
: address_(NULL), size_(0) {
- ASSERT(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment())));
+ DCHECK(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment())));
size_t request_size = RoundUp(size + alignment,
static_cast<intptr_t>(OS::AllocateAlignment()));
void* address = ReserveRegion(request_size);
@@ -214,11 +214,11 @@ VirtualMemory::VirtualMemory(size_t size, size_t alignment)
// Try reducing the size by freeing and then reallocating a specific area.
bool result = ReleaseRegion(address, request_size);
USE(result);
- ASSERT(result);
+ DCHECK(result);
address = VirtualAlloc(base, size, MEM_RESERVE, PAGE_NOACCESS);
if (address != NULL) {
request_size = size;
- ASSERT(base == static_cast<uint8_t*>(address));
+ DCHECK(base == static_cast<uint8_t*>(address));
} else {
// Resizing failed, just go with a bigger area.
address = ReserveRegion(request_size);
@@ -232,7 +232,7 @@ VirtualMemory::VirtualMemory(size_t size, size_t alignment)
VirtualMemory::~VirtualMemory() {
if (IsReserved()) {
bool result = ReleaseRegion(address_, size_);
- ASSERT(result);
+ DCHECK(result);
USE(result);
}
}
@@ -255,7 +255,7 @@ bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) {
bool VirtualMemory::Uncommit(void* address, size_t size) {
- ASSERT(IsReserved());
+ DCHECK(IsReserved());
return UncommitRegion(address, size);
}
« no previous file with comments | « src/base/platform/platform.h ('k') | src/base/platform/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698