Commit 9950f55a authored by jianli@chromium.org's avatar jianli@chromium.org

2009-06-16 Jian Li <jianli@chromium.org>

        Reviewed by David Levin.

        Bug 26450: Rename values of enum RedirectOriginCheck to make them
        clearer.
        https://bugs.webkit.org/show_bug.cgi?id=26450

        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::create):
        (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
        (WebCore::DocumentThreadableLoader::willSendRequest):
        * loader/DocumentThreadableLoader.h:
        * loader/ThreadableLoader.cpp:
        (WebCore::ThreadableLoader::create):
        (WebCore::ThreadableLoader::loadResourceSynchronously):
        * loader/ThreadableLoader.h:
        * workers/Worker.cpp:
        (WebCore::Worker::Worker):
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::importScripts):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
        (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
        * loader/WorkerThreadableLoader.h:
        (WebCore::WorkerThreadableLoader::create):
        * workers/WorkerScriptLoader.cpp:
        (WebCore::WorkerScriptLoader::loadSynchronously):
        (WebCore::WorkerScriptLoader::loadAsynchronously):
        * workers/WorkerScriptLoader.h:
        (WebCore::WorkerContext::importScripts):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::loadRequestAsynchronously):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6fbd8db2
2009-06-16 Jian Li <jianli@chromium.org>
Reviewed by David Levin.
Bug 26450: Rename values of enum RedirectOriginCheck to make them
clearer.
https://bugs.webkit.org/show_bug.cgi?id=26450
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::create):
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::willSendRequest):
* loader/DocumentThreadableLoader.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
(WebCore::ThreadableLoader::loadResourceSynchronously):
* loader/ThreadableLoader.h:
* workers/Worker.cpp:
(WebCore::Worker::Worker):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::importScripts):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::loadResourceSynchronously):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
* loader/WorkerThreadableLoader.h:
(WebCore::WorkerThreadableLoader::create):
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
* workers/WorkerScriptLoader.h:
(WebCore::WorkerContext::importScripts):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::loadRequestAsynchronously):
2009-06-16 Tony Chang <tony@chromium.org>
Reviewed by Darin Fisher.
......
......@@ -77,26 +77,26 @@ void DocumentThreadableLoader::loadResourceSynchronously(Document* document, con
client.didFinishLoading(identifier);
}
PassRefPtr<DocumentThreadableLoader> DocumentThreadableLoader::create(Document* document, ThreadableLoaderClient* client, const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, RedirectOriginCheck redirectOriginCheck)
PassRefPtr<DocumentThreadableLoader> DocumentThreadableLoader::create(Document* document, ThreadableLoaderClient* client, const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, CrossOriginRedirectPolicy crossOriginRedirectPolicy)
{
ASSERT(document);
RefPtr<DocumentThreadableLoader> loader = adoptRef(new DocumentThreadableLoader(document, client, request, callbacksSetting, contentSniff, storedCredentials, redirectOriginCheck));
RefPtr<DocumentThreadableLoader> loader = adoptRef(new DocumentThreadableLoader(document, client, request, callbacksSetting, contentSniff, storedCredentials, crossOriginRedirectPolicy));
if (!loader->m_loader)
loader = 0;
return loader.release();
}
DocumentThreadableLoader::DocumentThreadableLoader(Document* document, ThreadableLoaderClient* client, const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, RedirectOriginCheck redirectOriginCheck)
DocumentThreadableLoader::DocumentThreadableLoader(Document* document, ThreadableLoaderClient* client, const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, CrossOriginRedirectPolicy crossOriginRedirectPolicy)
: m_client(client)
, m_document(document)
, m_allowStoredCredentials(storedCredentials == AllowStoredCredentials)
, m_sameOriginRequest(document->securityOrigin()->canRequest(request.url()))
, m_checkRedirectOrigin(redirectOriginCheck == RequireSameRedirectOrigin)
, m_denyCrossOriginRedirect(crossOriginRedirectPolicy == DenyCrossOriginRedirect)
{
ASSERT(document);
ASSERT(client);
ASSERT(storedCredentials == AllowStoredCredentials || storedCredentials == DoNotAllowStoredCredentials);
ASSERT(redirectOriginCheck == RequireSameRedirectOrigin || redirectOriginCheck == AllowDifferentRedirectOrigin);
ASSERT(crossOriginRedirectPolicy == DenyCrossOriginRedirect || crossOriginRedirectPolicy == AllowCrossOriginRedirect);
m_loader = SubresourceLoader::create(document->frame(), this, request, false, callbacksSetting == SendLoadCallbacks, contentSniff == SniffContent);
}
......@@ -123,7 +123,7 @@ void DocumentThreadableLoader::willSendRequest(SubresourceLoader* loader, Resour
ASSERT_UNUSED(loader, loader == m_loader);
// FIXME: This needs to be fixed to follow the redirect correctly even for cross-domain requests.
if (m_checkRedirectOrigin && !m_document->securityOrigin()->canRequest(request.url())) {
if (m_denyCrossOriginRedirect && !m_document->securityOrigin()->canRequest(request.url())) {
RefPtr<DocumentThreadableLoader> protect(this);
m_client->didFailRedirectCheck();
request = ResourceRequest();
......
......@@ -45,7 +45,7 @@ namespace WebCore {
class DocumentThreadableLoader : public RefCounted<DocumentThreadableLoader>, public ThreadableLoader, private SubresourceLoaderClient {
public:
static void loadResourceSynchronously(Document*, const ResourceRequest&, ThreadableLoaderClient&, StoredCredentials);
static PassRefPtr<DocumentThreadableLoader> create(Document*, ThreadableLoaderClient*, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, RedirectOriginCheck);
static PassRefPtr<DocumentThreadableLoader> create(Document*, ThreadableLoaderClient*, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, CrossOriginRedirectPolicy);
virtual ~DocumentThreadableLoader();
virtual void cancel();
......@@ -58,7 +58,7 @@ namespace WebCore {
virtual void derefThreadableLoader() { deref(); }
private:
DocumentThreadableLoader(Document*, ThreadableLoaderClient*, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, RedirectOriginCheck);
DocumentThreadableLoader(Document*, ThreadableLoaderClient*, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, CrossOriginRedirectPolicy);
virtual void willSendRequest(SubresourceLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
virtual void didSendData(SubresourceLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
......@@ -76,7 +76,7 @@ namespace WebCore {
Document* m_document;
bool m_allowStoredCredentials;
bool m_sameOriginRequest;
bool m_checkRedirectOrigin;
bool m_denyCrossOriginRedirect;
};
} // namespace WebCore
......
......@@ -40,18 +40,18 @@
namespace WebCore {
PassRefPtr<ThreadableLoader> ThreadableLoader::create(ScriptExecutionContext* context, ThreadableLoaderClient* client, const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, RedirectOriginCheck redirectOriginCheck)
PassRefPtr<ThreadableLoader> ThreadableLoader::create(ScriptExecutionContext* context, ThreadableLoaderClient* client, const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, CrossOriginRedirectPolicy crossOriginRedirectPolicy)
{
ASSERT(client);
ASSERT(context);
#if ENABLE(WORKERS)
if (context->isWorkerContext())
return WorkerThreadableLoader::create(static_cast<WorkerContext*>(context), client, WorkerRunLoop::defaultMode(), request, callbacksSetting, contentSniff, storedCredentials, redirectOriginCheck);
return WorkerThreadableLoader::create(static_cast<WorkerContext*>(context), client, WorkerRunLoop::defaultMode(), request, callbacksSetting, contentSniff, storedCredentials, crossOriginRedirectPolicy);
#endif // ENABLE(WORKERS)
ASSERT(context->isDocument());
return DocumentThreadableLoader::create(static_cast<Document*>(context), client, request, callbacksSetting, contentSniff, storedCredentials, redirectOriginCheck);
return DocumentThreadableLoader::create(static_cast<Document*>(context), client, request, callbacksSetting, contentSniff, storedCredentials, crossOriginRedirectPolicy);
}
void ThreadableLoader::loadResourceSynchronously(ScriptExecutionContext* context, const ResourceRequest& request, ThreadableLoaderClient& client, StoredCredentials storedCredentials)
......@@ -60,7 +60,7 @@ void ThreadableLoader::loadResourceSynchronously(ScriptExecutionContext* context
#if ENABLE(WORKERS)
if (context->isWorkerContext()) {
WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerContext*>(context), request, client, storedCredentials, RequireSameRedirectOrigin);
WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerContext*>(context), request, client, storedCredentials, DenyCrossOriginRedirect);
return;
}
#endif // ENABLE(WORKERS)
......
......@@ -58,9 +58,9 @@ namespace WebCore {
DoNotAllowStoredCredentials
};
enum RedirectOriginCheck {
RequireSameRedirectOrigin,
AllowDifferentRedirectOrigin
enum CrossOriginRedirectPolicy {
DenyCrossOriginRedirect,
AllowCrossOriginRedirect
};
// Useful for doing loader operations from any thread (not threadsafe,
......@@ -68,7 +68,7 @@ namespace WebCore {
class ThreadableLoader : Noncopyable {
public:
static void loadResourceSynchronously(ScriptExecutionContext*, const ResourceRequest&, ThreadableLoaderClient&, StoredCredentials);
static PassRefPtr<ThreadableLoader> create(ScriptExecutionContext*, ThreadableLoaderClient*, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, RedirectOriginCheck);
static PassRefPtr<ThreadableLoader> create(ScriptExecutionContext*, ThreadableLoaderClient*, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, CrossOriginRedirectPolicy);
virtual void cancel() = 0;
void ref() { refThreadableLoader(); }
......
......@@ -54,10 +54,10 @@ namespace WebCore {
static const char loadResourceSynchronouslyMode[] = "loadResourceSynchronouslyMode";
WorkerThreadableLoader::WorkerThreadableLoader(WorkerContext* workerContext, ThreadableLoaderClient* client, const String& taskMode, const ResourceRequest& request, LoadCallbacks callbacksSetting,
ContentSniff contentSniff, StoredCredentials storedCredentials, RedirectOriginCheck redirectOriginCheck)
ContentSniff contentSniff, StoredCredentials storedCredentials, CrossOriginRedirectPolicy crossOriginRedirectPolicy)
: m_workerContext(workerContext)
, m_workerClientWrapper(ThreadableLoaderClientWrapper::create(client))
, m_bridge(*(new MainThreadBridge(m_workerClientWrapper, m_workerContext->thread()->workerLoaderProxy(), taskMode, request, callbacksSetting, contentSniff, storedCredentials, redirectOriginCheck)))
, m_bridge(*(new MainThreadBridge(m_workerClientWrapper, m_workerContext->thread()->workerLoaderProxy(), taskMode, request, callbacksSetting, contentSniff, storedCredentials, crossOriginRedirectPolicy)))
{
}
......@@ -66,7 +66,7 @@ WorkerThreadableLoader::~WorkerThreadableLoader()
m_bridge.destroy();
}
void WorkerThreadableLoader::loadResourceSynchronously(WorkerContext* workerContext, const ResourceRequest& request, ThreadableLoaderClient& client, StoredCredentials storedCredentials, RedirectOriginCheck redirectOriginCheck)
void WorkerThreadableLoader::loadResourceSynchronously(WorkerContext* workerContext, const ResourceRequest& request, ThreadableLoaderClient& client, StoredCredentials storedCredentials, CrossOriginRedirectPolicy crossOriginRedirectPolicy)
{
WorkerRunLoop& runLoop = workerContext->thread()->runLoop();
......@@ -75,7 +75,7 @@ void WorkerThreadableLoader::loadResourceSynchronously(WorkerContext* workerCont
mode.append(String::number(runLoop.createUniqueId()));
ContentSniff contentSniff = request.url().isLocalFile() ? SniffContent : DoNotSniffContent;
RefPtr<WorkerThreadableLoader> loader = WorkerThreadableLoader::create(workerContext, &client, mode, request, DoNotSendLoadCallbacks, contentSniff, storedCredentials, redirectOriginCheck);
RefPtr<WorkerThreadableLoader> loader = WorkerThreadableLoader::create(workerContext, &client, mode, request, DoNotSendLoadCallbacks, contentSniff, storedCredentials, crossOriginRedirectPolicy);
MessageQueueWaitResult result = MessageQueueMessageReceived;
while (!loader->done() && result != MessageQueueTerminated)
......@@ -92,20 +92,20 @@ void WorkerThreadableLoader::cancel()
WorkerThreadableLoader::MainThreadBridge::MainThreadBridge(PassRefPtr<ThreadableLoaderClientWrapper> workerClientWrapper, WorkerLoaderProxy& loaderProxy, const String& taskMode,
const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials,
RedirectOriginCheck redirectOriginCheck)
CrossOriginRedirectPolicy crossOriginRedirectPolicy)
: m_workerClientWrapper(workerClientWrapper)
, m_loaderProxy(loaderProxy)
, m_taskMode(taskMode.copy())
{
ASSERT(m_workerClientWrapper.get());
m_loaderProxy.postTaskToLoader(createCallbackTask(&MainThreadBridge::mainThreadCreateLoader, this, request, callbacksSetting, contentSniff, storedCredentials, redirectOriginCheck));
m_loaderProxy.postTaskToLoader(createCallbackTask(&MainThreadBridge::mainThreadCreateLoader, this, request, callbacksSetting, contentSniff, storedCredentials, crossOriginRedirectPolicy));
}
WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge()
{
}
void WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader(ScriptExecutionContext* context, MainThreadBridge* thisPtr, auto_ptr<CrossThreadResourceRequestData> requestData, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, RedirectOriginCheck redirectOriginCheck)
void WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader(ScriptExecutionContext* context, MainThreadBridge* thisPtr, auto_ptr<CrossThreadResourceRequestData> requestData, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, CrossOriginRedirectPolicy crossOriginRedirectPolicy)
{
ASSERT(isMainThread());
ASSERT(context->isDocument());
......@@ -117,7 +117,7 @@ void WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader(ScriptExec
// FIXME: If the a site requests a local resource, then this will return a non-zero value but the sync path
// will return a 0 value. Either this should return 0 or the other code path should do a callback with
// a failure.
thisPtr->m_mainThreadLoader = ThreadableLoader::create(context, thisPtr, *request, callbacksSetting, contentSniff, storedCredentials, redirectOriginCheck);
thisPtr->m_mainThreadLoader = ThreadableLoader::create(context, thisPtr, *request, callbacksSetting, contentSniff, storedCredentials, crossOriginRedirectPolicy);
ASSERT(thisPtr->m_mainThreadLoader);
}
......
......@@ -55,10 +55,10 @@ namespace WebCore {
class WorkerThreadableLoader : public RefCounted<WorkerThreadableLoader>, public ThreadableLoader {
public:
static void loadResourceSynchronously(WorkerContext*, const ResourceRequest&, ThreadableLoaderClient&, StoredCredentials, RedirectOriginCheck);
static PassRefPtr<WorkerThreadableLoader> create(WorkerContext* workerContext, ThreadableLoaderClient* client, const String& taskMode, const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, RedirectOriginCheck redirectOriginCheck)
static void loadResourceSynchronously(WorkerContext*, const ResourceRequest&, ThreadableLoaderClient&, StoredCredentials, CrossOriginRedirectPolicy);
static PassRefPtr<WorkerThreadableLoader> create(WorkerContext* workerContext, ThreadableLoaderClient* client, const String& taskMode, const ResourceRequest& request, LoadCallbacks callbacksSetting, ContentSniff contentSniff, StoredCredentials storedCredentials, CrossOriginRedirectPolicy crossOriginRedirectPolicy)
{
return adoptRef(new WorkerThreadableLoader(workerContext, client, taskMode, request, callbacksSetting, contentSniff, storedCredentials, redirectOriginCheck));
return adoptRef(new WorkerThreadableLoader(workerContext, client, taskMode, request, callbacksSetting, contentSniff, storedCredentials, crossOriginRedirectPolicy));
}
~WorkerThreadableLoader();
......@@ -97,7 +97,7 @@ namespace WebCore {
class MainThreadBridge : ThreadableLoaderClient {
public:
// All executed on the worker context's thread.
MainThreadBridge(PassRefPtr<ThreadableLoaderClientWrapper>, WorkerLoaderProxy&, const String& taskMode, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, RedirectOriginCheck);
MainThreadBridge(PassRefPtr<ThreadableLoaderClientWrapper>, WorkerLoaderProxy&, const String& taskMode, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, CrossOriginRedirectPolicy);
void cancel();
void destroy();
......@@ -109,7 +109,7 @@ namespace WebCore {
static void mainThreadDestroy(ScriptExecutionContext*, MainThreadBridge*);
~MainThreadBridge();
static void mainThreadCreateLoader(ScriptExecutionContext*, MainThreadBridge*, std::auto_ptr<CrossThreadResourceRequestData>, LoadCallbacks, ContentSniff, StoredCredentials, RedirectOriginCheck);
static void mainThreadCreateLoader(ScriptExecutionContext*, MainThreadBridge*, std::auto_ptr<CrossThreadResourceRequestData>, LoadCallbacks, ContentSniff, StoredCredentials, CrossOriginRedirectPolicy);
static void mainThreadCancel(ScriptExecutionContext*, MainThreadBridge*);
virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
virtual void didReceiveResponse(const ResourceResponse&);
......@@ -133,7 +133,7 @@ namespace WebCore {
String m_taskMode;
};
WorkerThreadableLoader(WorkerContext*, ThreadableLoaderClient*, const String& taskMode, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, RedirectOriginCheck);
WorkerThreadableLoader(WorkerContext*, ThreadableLoaderClient*, const String& taskMode, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, CrossOriginRedirectPolicy);
RefPtr<WorkerContext> m_workerContext;
RefPtr<ThreadableLoaderClientWrapper> m_workerClientWrapper;
......
......@@ -66,7 +66,7 @@ Worker::Worker(const String& url, ScriptExecutionContext* context, ExceptionCode
}
m_scriptLoader = new WorkerScriptLoader();
m_scriptLoader->loadAsynchronously(scriptExecutionContext(), m_scriptURL, RequireSameRedirectOrigin, this);
m_scriptLoader->loadAsynchronously(scriptExecutionContext(), m_scriptURL, DenyCrossOriginRedirect, this);
setPendingActivity(this); // The worker context does not exist while loading, so we must ensure that the worker object is not collected, as well as its event listeners.
}
......
......@@ -274,7 +274,7 @@ void WorkerContext::importScripts(const Vector<String>& urls, const String& call
for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++it) {
WorkerScriptLoader scriptLoader;
scriptLoader.loadSynchronously(scriptExecutionContext(), *it, AllowDifferentRedirectOrigin);
scriptLoader.loadSynchronously(scriptExecutionContext(), *it, AllowCrossOriginRedirect);
// If the fetching attempt failed, throw a NETWORK_ERR exception and abort all these steps.
if (scriptLoader.failed()) {
......
......@@ -47,16 +47,16 @@ WorkerScriptLoader::WorkerScriptLoader()
{
}
void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecutionContext, const String& url, RedirectOriginCheck redirectOriginCheck)
void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecutionContext, const String& url, CrossOriginRedirectPolicy crossOriginRedirectPolicy)
{
ResourceRequest request(url);
request.setHTTPMethod("GET");
ASSERT(scriptExecutionContext->isWorkerContext());
WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerContext*>(scriptExecutionContext), request, *this, AllowStoredCredentials, redirectOriginCheck);
WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerContext*>(scriptExecutionContext), request, *this, AllowStoredCredentials, crossOriginRedirectPolicy);
}
void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecutionContext, const String& url, RedirectOriginCheck redirectOriginCheck, WorkerScriptLoaderClient* client)
void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecutionContext, const String& url, CrossOriginRedirectPolicy crossOriginRedirectPolicy, WorkerScriptLoaderClient* client)
{
ASSERT(client);
m_client = client;
......@@ -64,7 +64,7 @@ void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecut
ResourceRequest request(url);
request.setHTTPMethod("GET");
m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, request, DoNotSendLoadCallbacks, DoNotSniffContent, AllowStoredCredentials, redirectOriginCheck);
m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, request, DoNotSendLoadCallbacks, DoNotSniffContent, AllowStoredCredentials, crossOriginRedirectPolicy);
}
void WorkerScriptLoader::didReceiveResponse(const ResourceResponse& response)
......
......@@ -45,8 +45,8 @@ namespace WebCore {
public:
WorkerScriptLoader();
void loadSynchronously(ScriptExecutionContext*, const String& url, RedirectOriginCheck);
void loadAsynchronously(ScriptExecutionContext*, const String& url, RedirectOriginCheck, WorkerScriptLoaderClient*);
void loadSynchronously(ScriptExecutionContext*, const String& url, CrossOriginRedirectPolicy);
void loadAsynchronously(ScriptExecutionContext*, const String& url, CrossOriginRedirectPolicy, WorkerScriptLoaderClient*);
const String& script() const { return m_script; }
bool failed() const { return m_failed; }
......
......@@ -674,7 +674,7 @@ void XMLHttpRequest::loadRequestAsynchronously(ResourceRequest& request)
if (m_upload)
request.setReportUploadProgress(true);
m_loader = ThreadableLoader::create(scriptExecutionContext(), this, request, callbacks, DoNotSniffContent, storedCredentials, RequireSameRedirectOrigin);
m_loader = ThreadableLoader::create(scriptExecutionContext(), this, request, callbacks, DoNotSniffContent, storedCredentials, DenyCrossOriginRedirect);
if (m_loader) {
// Neither this object nor the JavaScript wrapper should be deleted while
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment