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

Unified Diff: third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp

Issue 2319033002: Add WARN_UNUSED_RESULT to BytesConsumer read methods. (Closed)
Patch Set: rebase Created 4 years, 3 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
Index: third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp b/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
index 0ab8960df2e46f01cbd3a55ec36aa37b4422cb8e..27267d9945b09f9b04488c684b82d7ea85bbc1f1 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
@@ -209,7 +209,10 @@ void BytesConsumerTestUtil::TwoPhaseReader::onStateChange()
// because of the same reasons as Reader::onStateChange.
size_t read = std::max(static_cast<size_t>(3), available);
m_data.append(buffer, read);
- m_consumer->endRead(read);
+ if (m_consumer->endRead(read) != BytesConsumer::Result::Ok) {
+ m_result = BytesConsumer::Result::Error;
+ return;
+ }
break;
}
case BytesConsumer::Result::ShouldWait:
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/BytesConsumer.h ('k') | third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698