2009-02-25 David Levin <levin@chromium.org>
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Feb 2009 18:06:35 +0000 (18:06 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Feb 2009 18:06:35 +0000 (18:06 +0000)
commit1b162c366062c11ade19cf308662b0c83bf6524d
treef9113b5263e6bac2601439aa2b07db7531d34927
parent70c415e613d6336f198aac5e6cb72310ad5fe6b3
2009-02-25  David Levin  <levin@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Bug 23688: ThreadableLoader needs a sync implementation for Workers.
        <https://bugs.webkit.org/show_bug.cgi?id=23688>

        No observable change in behavior, so no test.

        * loader/ThreadableLoader.cpp:
        (WebCore::ThreadableLoader::loadResourceSynchronously):
        * loader/ThreadableLoaderClientWrapper.h:
        (WebCore::ThreadableLoaderClientWrapper::clearClient):
        (WebCore::ThreadableLoaderClientWrapper::done):
        (WebCore::ThreadableLoaderClientWrapper::didFinishLoading):
        (WebCore::ThreadableLoaderClientWrapper::didFail):
        (WebCore::ThreadableLoaderClientWrapper::didFailRedirectCheck):
        (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
        Expose whether the loader is done (based on what callbacks were done).

        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
        (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
        Each loader is given its own mode so that only its callbacks get through the run loop.

        The xhr spec says that the readystatechange events are synchronous, so in the case of a
        nested sync xhr no readystatechange events should be fired for the outer xhr.

        (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):

        * loader/WorkerThreadableLoader.h:
        (WebCore::WorkerThreadableLoader::create):
        (WebCore::WorkerThreadableLoader::done):

        * workers/WorkerRunLoop.cpp:
        (WebCore::WorkerRunLoop::WorkerRunLoop):
        * workers/WorkerRunLoop.h:
        (WebCore::WorkerRunLoop::createUniqueId):
        Simple method to create a uniqueId on demand with respect to the run loop.

        * workers/WorkerThread.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/loader/ThreadableLoader.cpp
WebCore/loader/ThreadableLoaderClientWrapper.h
WebCore/loader/WorkerThreadableLoader.cpp
WebCore/loader/WorkerThreadableLoader.h
WebCore/workers/WorkerRunLoop.cpp
WebCore/workers/WorkerRunLoop.h
WebCore/workers/WorkerThread.h