Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/modules/fetch/FetchManager.cpp

Issue 2177243002: Use per-frame TaskRunner instead of thread's default in DataConsumerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data_consumer_handle_unique_ptr
Patch Set: update Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698