Chromium Code Reviews| 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..fadf6a8f127ab02d399d0bbbbe58286afa35f347 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); |
|
Alexander Alekseev
2016/11/18 22:32:15
m_copplete is declared only if DCHECK_IS_ON()
|
| 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; |
| @@ -117,9 +117,7 @@ FileWriterSync::FileWriterSync() |
| } |
| void FileWriterSync::prepareForWrite() { |
| -#if DCHECK_IS_ON() |
| DCHECK(m_complete); |
| -#endif |
| m_error = FileError::kOK; |
| #if DCHECK_IS_ON() |
| m_complete = false; |