| Index: third_party/WebKit/Source/modules/fetch/Body.h
|
| diff --git a/third_party/WebKit/Source/modules/fetch/Body.h b/third_party/WebKit/Source/modules/fetch/Body.h
|
| index 1e9ee5374eb14ee5d5a8cdba5b51b8c763dc7da7..ea53d878d3fea7c93dcd6d3aa453e86a59c09cc9 100644
|
| --- a/third_party/WebKit/Source/modules/fetch/Body.h
|
| +++ b/third_party/WebKit/Source/modules/fetch/Body.h
|
| @@ -19,6 +19,13 @@ class ExecutionContext;
|
| class ReadableByteStream;
|
| class ScriptState;
|
|
|
| +// This class represents Body mix-in defined in the fetch spec
|
| +// https://fetch.spec.whatwg.org/#body-mixin.
|
| +//
|
| +// Note: This class has body stream and its predicate whereas in the current
|
| +// spec only Response has it and Request has a byte stream defined in the
|
| +// Encoding spec. The spec should be fixed shortly to be aligned with this
|
| +// implementation.
|
| class MODULES_EXPORT Body
|
| : public GarbageCollectedFinalized<Body>
|
| , public ScriptWrappable
|
| @@ -35,12 +42,12 @@ public:
|
| ScriptPromise formData(ScriptState*);
|
| ScriptPromise json(ScriptState*);
|
| ScriptPromise text(ScriptState*);
|
| - ReadableByteStream* body();
|
| + ReadableByteStream* bodyWithUseCounter();
|
| virtual BodyStreamBuffer* bodyBuffer() = 0;
|
| virtual const BodyStreamBuffer* bodyBuffer() const = 0;
|
|
|
| - bool bodyUsed();
|
| - void setBodyPassed() { m_bodyPassed = true; }
|
| + virtual bool bodyUsed();
|
| + bool isBodyLocked();
|
|
|
| // ActiveDOMObject override.
|
| bool hasPendingActivity() const override;
|
| @@ -51,9 +58,8 @@ public:
|
| }
|
|
|
| private:
|
| + ReadableByteStream* body();
|
| virtual String mimeType() const = 0;
|
| -
|
| - bool m_bodyPassed;
|
| };
|
|
|
| } // namespace blink
|
|
|