| Index: Source/modules/fetch/BodyStreamBuffer.cpp
|
| diff --git a/Source/modules/fetch/BodyStreamBuffer.cpp b/Source/modules/fetch/BodyStreamBuffer.cpp
|
| index 341b526e5413aae3e2085c1e9d2e671a03a29899..4cab5bc0b9f0507de40b886e891c5f055108333f 100644
|
| --- a/Source/modules/fetch/BodyStreamBuffer.cpp
|
| +++ b/Source/modules/fetch/BodyStreamBuffer.cpp
|
| @@ -10,6 +10,7 @@
|
| #include "core/dom/ExceptionCode.h"
|
| #include "modules/fetch/DataConsumerHandleUtil.h"
|
| #include "platform/blob/BlobData.h"
|
| +#include "platform/network/FormData.h"
|
|
|
| namespace blink {
|
|
|
| @@ -117,6 +118,20 @@ PassRefPtr<BlobDataHandle> BodyStreamBuffer::drainAsBlobDataHandle(FetchDataCons
|
| return nullptr;
|
| }
|
|
|
| +PassRefPtr<FormData> BodyStreamBuffer::drainAsFormData()
|
| +{
|
| + ASSERT(!isLocked());
|
| + if (ReadableStream::Closed == m_stream->stateInternal() || ReadableStream::Errored == m_stream->stateInternal())
|
| + return nullptr;
|
| +
|
| + RefPtr<FormData> formData = m_reader->drainAsFormData();
|
| + if (formData) {
|
| + close();
|
| + return formData.release();
|
| + }
|
| + return nullptr;
|
| +}
|
| +
|
| PassOwnPtr<FetchDataConsumerHandle> BodyStreamBuffer::lock(ExecutionContext* executionContext)
|
| {
|
| ASSERT(!isLocked());
|
|
|