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

Unified Diff: Source/modules/filesystem/FileWriterSync.cpp

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/modules/filesystem/FileWriterSync.h ('k') | Source/modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/filesystem/FileWriterSync.cpp
diff --git a/Source/modules/filesystem/FileWriterSync.cpp b/Source/modules/filesystem/FileWriterSync.cpp
index fb2103bce84178d3e6a94f3b698262aecb083742..9fb44f387ff525a07f0d692caceb6ef9592a2cf0 100644
--- a/Source/modules/filesystem/FileWriterSync.cpp
+++ b/Source/modules/filesystem/FileWriterSync.cpp
@@ -92,7 +92,7 @@ void FileWriterSync::didWrite(long long bytes, bool complete)
{
ASSERT(m_error == FileError::OK);
ASSERT(!m_complete);
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_complete = complete;
#else
ASSERT_UNUSED(complete, complete);
@@ -103,7 +103,7 @@ void FileWriterSync::didTruncate()
{
ASSERT(m_error == FileError::OK);
ASSERT(!m_complete);
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_complete = true;
#endif
}
@@ -113,14 +113,14 @@ void FileWriterSync::didFail(blink::WebFileError error)
ASSERT(m_error == FileError::OK);
m_error = static_cast<FileError::ErrorCode>(error);
ASSERT(!m_complete);
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_complete = true;
#endif
}
FileWriterSync::FileWriterSync()
: m_error(FileError::OK)
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
, m_complete(true)
#endif
{
@@ -131,7 +131,7 @@ void FileWriterSync::prepareForWrite()
{
ASSERT(m_complete);
m_error = FileError::OK;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_complete = false;
#endif
}
« no previous file with comments | « Source/modules/filesystem/FileWriterSync.h ('k') | Source/modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698