OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/fetch/Body.h" | 5 #include "modules/fetch/Body.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
8 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
9 #include "bindings/core/v8/V8ArrayBuffer.h" | 10 #include "bindings/core/v8/V8ArrayBuffer.h" |
10 #include "bindings/core/v8/V8ThrowException.h" | 11 #include "bindings/core/v8/V8ThrowException.h" |
11 #include "core/dom/DOMArrayBuffer.h" | 12 #include "core/dom/DOMArrayBuffer.h" |
12 #include "core/dom/DOMTypedArray.h" | 13 #include "core/dom/DOMTypedArray.h" |
13 #include "core/fileapi/Blob.h" | 14 #include "core/fileapi/Blob.h" |
14 #include "core/frame/UseCounter.h" | 15 #include "core/frame/UseCounter.h" |
15 #include "modules/fetch/BodyStreamBuffer.h" | 16 #include "modules/fetch/BodyStreamBuffer.h" |
16 #include "modules/fetch/FetchDataLoader.h" | 17 #include "modules/fetch/FetchDataLoader.h" |
17 #include "public/platform/WebDataConsumerHandle.h" | 18 #include "public/platform/WebDataConsumerHandle.h" |
18 #include "wtf/PassRefPtr.h" | 19 #include "wtf/PassRefPtr.h" |
19 #include "wtf/RefPtr.h" | 20 #include "wtf/RefPtr.h" |
20 #include <memory> | |
21 | 21 |
22 namespace blink { | 22 namespace blink { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 class BodyConsumerBase : public GarbageCollectedFinalized<BodyConsumerBase>, | 26 class BodyConsumerBase : public GarbageCollectedFinalized<BodyConsumerBase>, |
27 public FetchDataLoader::Client { | 27 public FetchDataLoader::Client { |
28 WTF_MAKE_NONCOPYABLE(BodyConsumerBase); | 28 WTF_MAKE_NONCOPYABLE(BodyConsumerBase); |
29 USING_GARBAGE_COLLECTED_MIXIN(BodyConsumerBase); | 29 USING_GARBAGE_COLLECTED_MIXIN(BodyConsumerBase); |
30 | 30 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 ScriptPromise Body::rejectInvalidConsumption(ScriptState* scriptState) { | 229 ScriptPromise Body::rejectInvalidConsumption(ScriptState* scriptState) { |
230 if (isBodyLocked() || bodyUsed()) | 230 if (isBodyLocked() || bodyUsed()) |
231 return ScriptPromise::reject( | 231 return ScriptPromise::reject( |
232 scriptState, V8ThrowException::createTypeError(scriptState->isolate(), | 232 scriptState, V8ThrowException::createTypeError(scriptState->isolate(), |
233 "Already read")); | 233 "Already read")); |
234 return ScriptPromise(); | 234 return ScriptPromise(); |
235 } | 235 } |
236 | 236 |
237 } // namespace blink | 237 } // namespace blink |
OLD | NEW |