WebCore:
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jun 2009 18:24:47 +0000 (18:24 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jun 2009 18:24:47 +0000 (18:24 +0000)
commit8ececd1d2c6daa6c14ea16292ca138471e5ecf23
tree3d1f5d46fc3431368b8a732fd1253bbc9f8af6a7
parent9ef2fde0554dc011717583a50523efdd60df3baf
WebCore:

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

        Reviewed by David Levin.

        Bug 26196: Fix the problem that worker's importScripts fails if the
        script URL is redirected from different origin.
        https://bugs.webkit.org/show_bug.cgi?id=26196

        Test: http/tests/workers/worker-importScripts.html

        The fix is to pass an additional enum parameter to the loader in
        order to tell it to perform the redirect origin check or not.

        * 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:
        (WebCore::):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
        (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
        * loader/WorkerThreadableLoader.h:
        (WebCore::WorkerThreadableLoader::create):
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::importScripts):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::loadRequestAsynchronously):

LayoutTests:

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

        Reviewed by David Levin.

        Bug 26196: Fix the problem that worker's importScripts fails if the
        script URL is redirected from different origin.
        https://bugs.webkit.org/show_bug.cgi?id=26196

        Add a test case in the importScripts layout test to cover the scenario
        that the import script URL can come from different redirect origin.

        * http/tests/workers/resources/worker-importScripts.js:
        * http/tests/workers/worker-importScripts-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/workers/resources/worker-importScripts.js
LayoutTests/http/tests/workers/worker-importScripts-expected.txt
WebCore/ChangeLog
WebCore/loader/DocumentThreadableLoader.cpp
WebCore/loader/DocumentThreadableLoader.h
WebCore/loader/ThreadableLoader.cpp
WebCore/loader/ThreadableLoader.h
WebCore/loader/WorkerThreadableLoader.cpp
WebCore/loader/WorkerThreadableLoader.h
WebCore/workers/WorkerContext.cpp
WebCore/xml/XMLHttpRequest.cpp