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

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

Issue 2513893002: Make ifdefs consistent in WebKit/Source/core/ (Closed)
Patch Set: Created 4 years, 1 month 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
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..54b967aec98b2275827c7bb4e652c92f8cf3c211 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());
+#if DCHECK_IS_ON()
ASSERT(m_complete);
+#endif
prepareForWrite();
writer()->write(position(), data->uuid());
+#if DCHECK_IS_ON()
ASSERT(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());
+#if DCHECK_IS_ON()
ASSERT(m_complete);
+#endif
seekInternal(position);
}
void FileWriterSync::truncate(long long offset,
ExceptionState& exceptionState) {
ASSERT(writer());
+#if DCHECK_IS_ON()
ASSERT(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);
+#if DCHECK_IS_ON()
ASSERT(m_complete);
+#endif
if (m_error) {
FileError::throwDOMException(exceptionState, m_error);
return;

Powered by Google App Engine
This is Rietveld 408576698