Index: third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
diff --git a/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp b/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
index 0e98cb65e50c6088c2fa95b990a67e5bab8a00fa..01016800c2ca73813452f96c551ce9436ff36c43 100644 |
--- a/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
+++ b/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
@@ -83,24 +83,25 @@ public: |
ASSERT(executionContext->isContextThread()); |
ASSERT(!m_loader); |
- m_loader = createLoader(executionContext, this); |
- if (!m_loader) |
- m_updater->update(createUnexpectedErrorDataConsumerHandle()); |
- } |
- |
-private: |
- PassRefPtr<ThreadableLoader> createLoader(ExecutionContext* executionContext, ThreadableLoaderClient* client) const |
- { |
KURL url = BlobURL::createPublicURL(executionContext->securityOrigin()); |
if (url.isEmpty()) { |
- return nullptr; |
+ m_updater->update(createUnexpectedErrorDataConsumerHandle()); |
+ return; |
} |
BlobRegistry::registerPublicBlobURL(executionContext->securityOrigin(), url, m_blobDataHandle); |
+ m_loader = createLoader(executionContext, this); |
+ ASSERT(m_loader); |
+ |
ResourceRequest request(url); |
request.setRequestContext(WebURLRequest::RequestContextInternal); |
request.setUseStreamOnResponse(true); |
+ m_loader->start(request); |
+ } |
+private: |
+ PassRefPtr<ThreadableLoader> createLoader(ExecutionContext* executionContext, ThreadableLoaderClient* client) const |
+ { |
ThreadableLoaderOptions options; |
options.preflightPolicy = ConsiderPreflight; |
options.crossOriginRequestPolicy = DenyCrossOriginRequests; |
@@ -110,7 +111,7 @@ private: |
ResourceLoaderOptions resourceLoaderOptions; |
resourceLoaderOptions.dataBufferingPolicy = DoNotBufferData; |
- return m_loaderFactory->create(*executionContext, client, request, options, resourceLoaderOptions); |
+ return m_loaderFactory->create(*executionContext, client, options, resourceLoaderOptions); |
} |
// ThreadableLoaderClient |
@@ -160,11 +161,10 @@ public: |
PassRefPtr<ThreadableLoader> create( |
ExecutionContext& executionContext, |
ThreadableLoaderClient* client, |
- const ResourceRequest& request, |
const ThreadableLoaderOptions& options, |
const ResourceLoaderOptions& resourceLoaderOptions) override |
{ |
- return ThreadableLoader::create(executionContext, client, request, options, resourceLoaderOptions); |
+ return ThreadableLoader::create(executionContext, client, options, resourceLoaderOptions); |
} |
}; |