WebCore:
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2009 18:12:46 +0000 (18:12 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2009 18:12:46 +0000 (18:12 +0000)
commit60109a0f57f6c3d8b7506d6f440a38bbe77d3401
treef2ef170a923a4c3b9f37c68f27323b08d6686139
parentd567219e40aaae1c69f971ce48494caed57760dd
WebCore:

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

        Reviewed by Adam Barth and David Levin.

        Bug 26146: Change to use ThreadableLoader to load the worker script
        in order to check URL origin for redirection.
        https://bugs.webkit.org/show_bug.cgi?id=26146

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

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * workers/Worker.cpp:
        (WebCore::Worker::Worker):
        (WebCore::Worker::notifyFinished):
        * workers/Worker.h:
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::importScripts):
        * workers/WorkerImportScriptsClient.cpp: Removed.
        * workers/WorkerImportScriptsClient.h: Removed.
        * workers/WorkerScriptLoader.cpp: Renamed from workers/WorkerImportScriptsClient.cpp.
          This to make it more generic so worker script loading could use it.
        (WebCore::WorkerScriptLoader::loadSynchronously):
        (WebCore::WorkerScriptLoader::loadAsynchronously):
        (WebCore::WorkerScriptLoader::didFinishLoading):
        (WebCore::WorkerScriptLoader::didFail):
        (WebCore::WorkerScriptLoader::didFailRedirectCheck):
        (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
        (WebCore::WorkerScriptLoader::notifyFinished):
        * workers/WorkerScriptLoader.h: Renamed from workers/WorkerImportScriptsClient.h.
          This to make it more generic so worker script loading could use it.
        * workers/WorkerScriptLoaderClient.h: Added.

LayoutTests:

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

        Reviewed by Adam Barth and David Levin.

        Bug 26146: Change to use ThreadableLoader to load the worker script
        in order to check URL origin for redirection.
        https://bugs.webkit.org/show_bug.cgi?id=26146

        Add a layout test to cover the scenario that the worker script is
        loaded from different redirect origin.

        * http/tests/workers/resources/worker-redirect-target.js: Added.
        * http/tests/workers/worker-redirect-expected.txt: Added.
        * http/tests/workers/worker-redirect.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/workers/resources/worker-redirect-target.js [new file with mode: 0644]
LayoutTests/http/tests/workers/worker-redirect-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/workers/worker-redirect.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/workers/Worker.cpp
WebCore/workers/Worker.h
WebCore/workers/WorkerContext.cpp
WebCore/workers/WorkerScriptLoader.cpp [moved from WebCore/workers/WorkerImportScriptsClient.cpp with 53% similarity]
WebCore/workers/WorkerScriptLoader.h [moved from WebCore/workers/WorkerImportScriptsClient.h with 72% similarity]
WebCore/workers/WorkerScriptLoaderClient.h [new file with mode: 0644]