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

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

Issue 2524813003: WebKit: remove DCHECK_IS_ON from FileWriterSync. (Closed)
Patch Set: Reverted "Guard with #ifdefs" Created 4 years 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 | « third_party/WebKit/Source/modules/filesystem/FileWriterSync.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp b/third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp
index 0bb0fa4747b3c2deb829743bfee4dcbbd4194c60..b8529b6c80bfaa461ef7e088f06de6824f4f5d0a 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp
@@ -41,11 +41,11 @@ namespace blink {
void FileWriterSync::write(Blob* data, ExceptionState& exceptionState) {
ASSERT(data);
ASSERT(writer());
- ASSERT(m_complete);
+ DCHECK(m_complete);
prepareForWrite();
writer()->write(position(), data->uuid());
- ASSERT(m_complete);
+ DCHECK(m_complete);
if (m_error) {
FileError::throwDOMException(exceptionState, m_error);
return;
@@ -57,14 +57,14 @@ void FileWriterSync::write(Blob* data, ExceptionState& exceptionState) {
void FileWriterSync::seek(long long position, ExceptionState& exceptionState) {
ASSERT(writer());
- ASSERT(m_complete);
+ DCHECK(m_complete);
seekInternal(position);
}
void FileWriterSync::truncate(long long offset,
ExceptionState& exceptionState) {
ASSERT(writer());
- ASSERT(m_complete);
+ DCHECK(m_complete);
if (offset < 0) {
exceptionState.throwDOMException(InvalidStateError,
FileError::invalidStateErrorMessage);
@@ -72,7 +72,7 @@ void FileWriterSync::truncate(long long offset,
}
prepareForWrite();
writer()->truncate(offset);
- ASSERT(m_complete);
+ DCHECK(m_complete);
if (m_error) {
FileError::throwDOMException(exceptionState, m_error);
return;
@@ -84,46 +84,29 @@ void FileWriterSync::truncate(long long offset,
void FileWriterSync::didWrite(long long bytes, bool complete) {
DCHECK_EQ(FileError::kOK, m_error);
-#if DCHECK_IS_ON()
DCHECK(!m_complete);
m_complete = complete;
-#endif
}
void FileWriterSync::didTruncate() {
DCHECK_EQ(FileError::kOK, m_error);
-#if DCHECK_IS_ON()
DCHECK(!m_complete);
m_complete = true;
-#endif
}
void FileWriterSync::didFail(WebFileError error) {
DCHECK_EQ(FileError::kOK, m_error);
m_error = static_cast<FileError::ErrorCode>(error);
-#if DCHECK_IS_ON()
DCHECK(!m_complete);
m_complete = true;
-#endif
}
-FileWriterSync::FileWriterSync()
- : m_error(FileError::kOK)
-#if DCHECK_IS_ON()
- ,
- m_complete(true)
-#endif
-{
-}
+FileWriterSync::FileWriterSync() : m_error(FileError::kOK), m_complete(true) {}
void FileWriterSync::prepareForWrite() {
-#if DCHECK_IS_ON()
DCHECK(m_complete);
-#endif
m_error = FileError::kOK;
-#if DCHECK_IS_ON()
m_complete = false;
-#endif
}
FileWriterSync::~FileWriterSync() {}
« no previous file with comments | « third_party/WebKit/Source/modules/filesystem/FileWriterSync.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698