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

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

Issue 2292763002: [Fetch API] Implement Request.formData and Response.formData. (Closed)
Patch Set: Rebase, LayoutTests updates Created 3 years, 7 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/BodyStreamBuffer.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
index aba56e9e28821a39b7e8a02da53f334730cb0b64..00c192dfba3a589ec6312733c54d552005c51803 100644
--- a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
@@ -48,6 +48,11 @@ class BodyStreamBuffer::LoaderClient final
client_->DidFetchDataLoadedArrayBuffer(array_buffer);
}
+ void DidFetchDataLoadedFormData(FormData* form_data) override {
+ buffer_->EndLoading();
+ client_->DidFetchDataLoadedFormData(form_data);
+ }
+
void DidFetchDataLoadedString(const String& string) override {
buffer_->EndLoading();
client_->DidFetchDataLoadedString(string);
@@ -284,7 +289,8 @@ void BodyStreamBuffer::CloseAndLockAndDisturb() {
}
void BodyStreamBuffer::Close() {
- Controller()->Close();
+ if (auto* controller = Controller())
+ controller->Close();
CancelConsumer();
}

Powered by Google App Engine
This is Rietveld 408576698