Chromium Code Reviews| Index: Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
| diff --git a/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp b/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
| index 9005fb551944f0fc283f8c371eaa5be99f5a03fb..86b29f157b6331d1aeb7d75fd4f09de14200f52b 100644 |
| --- a/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
| +++ b/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp |
| @@ -244,24 +244,23 @@ 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()) { |
|
hiroshige
2015/07/30 12:07:21
Please call m_updater->update(createUnexpectedErro
tyoshino (SeeGerritForStatus)
2015/07/31 08:00:42
Good catch! Done
|
| - return nullptr; |
| + return; |
| } |
| BlobRegistry::registerPublicBlobURL(executionContext->securityOrigin(), url, m_blobDataHandle); |
| + m_loader = createLoader(executionContext, this); |
|
hiroshige
2015/07/30 12:07:21
Please add ASSERT(m_loader) here.
tyoshino (SeeGerritForStatus)
2015/07/31 08:00:42
Done.
|
| + |
| 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; |
| @@ -271,7 +270,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 |
| @@ -321,11 +320,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); |
| } |
| }; |