diff options
author | Ben Murdoch <benm@google.com> | 2009-08-18 15:36:45 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-18 19:20:06 +0100 |
commit | d227fc870c7a697500a3c900c31baf05fb9a8524 (patch) | |
tree | a3fa109aa5bf52fef562ac49d97a2f723889cc71 /WebCore/workers/WorkerScriptLoader.cpp | |
parent | f2c627513266faa73f7669058d98c60769fb3524 (diff) | |
download | external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.zip external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.tar.gz external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.tar.bz2 |
Merge WebKit r47420
Diffstat (limited to 'WebCore/workers/WorkerScriptLoader.cpp')
-rw-r--r-- | WebCore/workers/WorkerScriptLoader.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/WebCore/workers/WorkerScriptLoader.cpp b/WebCore/workers/WorkerScriptLoader.cpp index 0162b26..52baf2d 100644 --- a/WebCore/workers/WorkerScriptLoader.cpp +++ b/WebCore/workers/WorkerScriptLoader.cpp @@ -50,7 +50,7 @@ WorkerScriptLoader::WorkerScriptLoader() { } -void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecutionContext, const KURL& url, CrossOriginRedirectPolicy crossOriginRedirectPolicy) +void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecutionContext, const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy) { m_url = url; @@ -59,10 +59,15 @@ void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecuti return; ASSERT(scriptExecutionContext->isWorkerContext()); - WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerContext*>(scriptExecutionContext), *request, *this, AllowStoredCredentials, crossOriginRedirectPolicy); + + ThreadableLoaderOptions options; + options.allowCredentials = true; + options.crossOriginRequestPolicy = crossOriginRequestPolicy; + + WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerContext*>(scriptExecutionContext), *request, *this, options); } -void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecutionContext, const KURL& url, CrossOriginRedirectPolicy crossOriginRedirectPolicy, WorkerScriptLoaderClient* client) +void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecutionContext, const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy, WorkerScriptLoaderClient* client) { ASSERT(client); m_client = client; @@ -72,7 +77,11 @@ void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecut if (!request) return; - m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, *request, DoNotSendLoadCallbacks, DoNotSniffContent, AllowStoredCredentials, crossOriginRedirectPolicy); + ThreadableLoaderOptions options; + options.allowCredentials = true; + options.crossOriginRequestPolicy = crossOriginRequestPolicy; + + m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, *request, options); } PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest() |