| 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/FetchManager.h" | 5 #include "modules/fetch/FetchManager.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/V8ThrowException.h" | 10 #include "bindings/core/v8/V8ThrowException.h" |
| 11 #include "core/dom/DOMArrayBuffer.h" | 11 #include "core/dom/DOMArrayBuffer.h" |
| 12 #include "core/dom/Document.h" | 12 #include "core/dom/Document.h" |
| 13 #include "core/dom/TaskRunnerHelper.h" |
| 13 #include "core/fetch/FetchUtils.h" | 14 #include "core/fetch/FetchUtils.h" |
| 14 #include "core/fileapi/Blob.h" | 15 #include "core/fileapi/Blob.h" |
| 15 #include "core/frame/Frame.h" | 16 #include "core/frame/Frame.h" |
| 16 #include "core/frame/SubresourceIntegrity.h" | 17 #include "core/frame/SubresourceIntegrity.h" |
| 17 #include "core/frame/csp/ContentSecurityPolicy.h" | 18 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 18 #include "core/inspector/ConsoleMessage.h" | 19 #include "core/inspector/ConsoleMessage.h" |
| 19 #include "core/inspector/InspectorInstrumentation.h" | 20 #include "core/inspector/InspectorInstrumentation.h" |
| 20 #include "core/loader/ThreadableLoader.h" | 21 #include "core/loader/ThreadableLoader.h" |
| 21 #include "core/loader/ThreadableLoaderClient.h" | 22 #include "core/loader/ThreadableLoaderClient.h" |
| 22 #include "core/page/ChromeClient.h" | 23 #include "core/page/ChromeClient.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // explicitly finish the loader here. | 126 // explicitly finish the loader here. |
| 126 if (m_loader->m_didFinishLoading) | 127 if (m_loader->m_didFinishLoading) |
| 127 m_loader->loadSucceeded(); | 128 m_loader->loadSucceeded(); |
| 128 return; | 129 return; |
| 129 } | 130 } |
| 130 } | 131 } |
| 131 m_updater->update(createUnexpectedErrorDataConsumerHandle()); | 132 m_updater->update(createUnexpectedErrorDataConsumerHandle()); |
| 132 m_loader->performNetworkError(errorMessage); | 133 m_loader->performNetworkError(errorMessage); |
| 133 } | 134 } |
| 134 | 135 |
| 136 WebTaskRunner* getTaskRunner() override |
| 137 { |
| 138 return TaskRunnerHelper::getUnthrottledTaskRunner(m_loader->m_execut
ionContext); |
| 139 } |
| 140 |
| 135 bool isFinished() const { return m_finished; } | 141 bool isFinished() const { return m_finished; } |
| 136 | 142 |
| 137 DEFINE_INLINE_TRACE() | 143 DEFINE_INLINE_TRACE() |
| 138 { | 144 { |
| 139 visitor->trace(m_updater); | 145 visitor->trace(m_updater); |
| 140 visitor->trace(m_response); | 146 visitor->trace(m_response); |
| 141 visitor->trace(m_loader); | 147 visitor->trace(m_loader); |
| 142 } | 148 } |
| 143 private: | 149 private: |
| 144 std::unique_ptr<WebDataConsumerHandle> m_handle; | 150 std::unique_ptr<WebDataConsumerHandle> m_handle; |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 loader->dispose(); | 747 loader->dispose(); |
| 742 } | 748 } |
| 743 | 749 |
| 744 DEFINE_TRACE(FetchManager) | 750 DEFINE_TRACE(FetchManager) |
| 745 { | 751 { |
| 746 visitor->trace(m_loaders); | 752 visitor->trace(m_loaders); |
| 747 ContextLifecycleObserver::trace(visitor); | 753 ContextLifecycleObserver::trace(visitor); |
| 748 } | 754 } |
| 749 | 755 |
| 750 } // namespace blink | 756 } // namespace blink |
| OLD | NEW |