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/BodyStreamBuffer.h" | 5 #include "modules/fetch/BodyStreamBuffer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/V8PrivateProperty.h" | |
10 #include "bindings/core/v8/V8ThrowException.h" | |
11 #include "core/dom/DOMArrayBuffer.h" | 9 #include "core/dom/DOMArrayBuffer.h" |
12 #include "core/dom/DOMTypedArray.h" | 10 #include "core/dom/DOMTypedArray.h" |
13 #include "core/dom/ExceptionCode.h" | 11 #include "core/dom/ExceptionCode.h" |
14 #include "core/dom/ExecutionContext.h" | 12 #include "core/dom/ExecutionContext.h" |
15 #include "core/streams/ReadableStreamController.h" | 13 #include "core/streams/ReadableStreamController.h" |
16 #include "core/streams/ReadableStreamOperations.h" | 14 #include "core/streams/ReadableStreamOperations.h" |
17 #include "modules/fetch/Body.h" | 15 #include "modules/fetch/Body.h" |
18 #include "modules/fetch/ReadableStreamBytesConsumer.h" | 16 #include "modules/fetch/ReadableStreamBytesConsumer.h" |
19 #include "platform/bindings/ScriptState.h" | 17 #include "platform/bindings/ScriptState.h" |
| 18 #include "platform/bindings/V8PrivateProperty.h" |
| 19 #include "platform/bindings/V8ThrowException.h" |
20 #include "platform/blob/BlobData.h" | 20 #include "platform/blob/BlobData.h" |
21 #include "platform/network/EncodedFormData.h" | 21 #include "platform/network/EncodedFormData.h" |
22 | 22 |
23 namespace blink { | 23 namespace blink { |
24 | 24 |
25 class BodyStreamBuffer::LoaderClient final | 25 class BodyStreamBuffer::LoaderClient final |
26 : public GarbageCollectedFinalized<LoaderClient>, | 26 : public GarbageCollectedFinalized<LoaderClient>, |
27 public ContextLifecycleObserver, | 27 public ContextLifecycleObserver, |
28 public FetchDataLoader::Client { | 28 public FetchDataLoader::Client { |
29 WTF_MAKE_NONCOPYABLE(LoaderClient); | 29 WTF_MAKE_NONCOPYABLE(LoaderClient); |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 } | 389 } |
390 if (is_errored) | 390 if (is_errored) |
391 return BytesConsumer::CreateErrored(BytesConsumer::Error("error")); | 391 return BytesConsumer::CreateErrored(BytesConsumer::Error("error")); |
392 | 392 |
393 DCHECK(consumer); | 393 DCHECK(consumer); |
394 consumer->ClearClient(); | 394 consumer->ClearClient(); |
395 return consumer; | 395 return consumer; |
396 } | 396 } |
397 | 397 |
398 } // namespace blink | 398 } // namespace blink |
OLD | NEW |