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..64b3d860ca34c58f25e68d7f783a8a9d17abe7d6 100644 |
| --- a/third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp |
| +++ b/third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp |
| @@ -41,11 +41,15 @@ namespace blink { |
| void FileWriterSync::write(Blob* data, ExceptionState& exceptionState) { |
| ASSERT(data); |
| ASSERT(writer()); |
| - ASSERT(m_complete); |
| +#if DCHECK_IS_ON() |
|
nhiroki
2016/11/21 03:24:57
Instead of adding DCHECK_IS_ON(), can you complete
Yuta Kitamura
2016/11/21 05:32:06
Ditto. All these changes are wrong.
Yuta Kitamura
2016/11/21 09:26:12
I was wrong. I agree with nhiroki here.
Alexander Alekseev
2016/11/23 09:20:30
Done.
|
| + DCHECK(m_complete); |
| +#endif |
| prepareForWrite(); |
| writer()->write(position(), data->uuid()); |
| - ASSERT(m_complete); |
| +#if DCHECK_IS_ON() |
| + DCHECK(m_complete); |
| +#endif |
| if (m_error) { |
| FileError::throwDOMException(exceptionState, m_error); |
| return; |
| @@ -57,14 +61,18 @@ void FileWriterSync::write(Blob* data, ExceptionState& exceptionState) { |
| void FileWriterSync::seek(long long position, ExceptionState& exceptionState) { |
| ASSERT(writer()); |
| - ASSERT(m_complete); |
| +#if DCHECK_IS_ON() |
| + DCHECK(m_complete); |
| +#endif |
| seekInternal(position); |
| } |
| void FileWriterSync::truncate(long long offset, |
| ExceptionState& exceptionState) { |
| ASSERT(writer()); |
| - ASSERT(m_complete); |
| +#if DCHECK_IS_ON() |
| + DCHECK(m_complete); |
| +#endif |
| if (offset < 0) { |
| exceptionState.throwDOMException(InvalidStateError, |
| FileError::invalidStateErrorMessage); |
| @@ -72,7 +80,9 @@ void FileWriterSync::truncate(long long offset, |
| } |
| prepareForWrite(); |
| writer()->truncate(offset); |
| - ASSERT(m_complete); |
| +#if DCHECK_IS_ON() |
| + DCHECK(m_complete); |
| +#endif |
| if (m_error) { |
| FileError::throwDOMException(exceptionState, m_error); |
| return; |