WebCore:
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Mar 2009 21:09:29 +0000 (21:09 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Mar 2009 21:09:29 +0000 (21:09 +0000)
commit5ada0fd77a62347803a44b895c03724889ed66b5
treeba12ed3722576784c96cca13716236d72249f5a7
parenta92c685d8c15ef0975260ee5d1f4021b242d95d6
WebCore:

2009-03-01  David Levin  <levin@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Bug 24271: XMLHttpRequest needs js bindings for Workers.
        <https://bugs.webkit.org/show_bug.cgi?id=24271>

        Tests: http/tests/xmlhttprequest/workers/methods-async.html
               http/tests/xmlhttprequest/workers/methods.html

        * bindings/js/JSWorkerContextBase.cpp:
        (WebCore::JSWorkerContextBase::getOwnPropertySlot):
        (jsWorkerContextBaseXMLHttpRequest):
        (setJSWorkerContextBaseXMLHttpRequest):
        Expose XMLHttpRequest to Workers.

        * bindings/js/JSWorkerContextBase.h:

        * bindings/js/JSXMLHttpRequestConstructor.cpp:
        (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
        (WebCore::constructXMLHttpRequest):
        (WebCore::JSXMLHttpRequestConstructor::mark):
        Removed the dependencies on Document.

        * bindings/js/JSXMLHttpRequestConstructor.h:
        (WebCore::JSXMLHttpRequestConstructor::scriptExecutionContext):
        * dom/EventException.idl:
        * dom/EventListener.idl:
        Chnage to have the NoStaticTables attribute since they are used from XHR.

        * loader/WorkerThreadableLoader.cpp:
        (WebCore::workerContextDidFinishLoading):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
        Fixed identifier to be unsigned long.

        * loader/WorkerThreadableLoader.h:
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::workerThread):
        Stop active objects when the thread is getting shutdown so that xhr gets properly shutdown.

        * xml/XMLHttpRequestUpload.cpp:

        * xml/XMLHttpRequest.idl:
        * xml/XMLHttpRequestException.idl:
        * xml/XMLHttpRequestProgressEvent.idl:
        * xml/XMLHttpRequestUpload.idl:
        Chnage to have the NoStaticTables attribute since they are used from XHR.

LayoutTests:

2009-03-01  David Levin  <levin@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Bug 24271: XMLHttpRequest needs js bindings for Workers.
        <https://bugs.webkit.org/show_bug.cgi?id=24271>

        Some sanity checks for xhr done from workers. These are the same as
        tests done for normal workers.

        * http/tests/xmlhttprequest/workers/methods-async-expected.txt: Added.
        * http/tests/xmlhttprequest/workers/methods-async.html: Added.
        * http/tests/xmlhttprequest/workers/methods-expected.txt: Added.
        * http/tests/xmlhttprequest/workers/methods.html: Added.
        * http/tests/xmlhttprequest/workers/resources/methods-async.js: Added.
        (onmessage):
        (log):
        (done):
        (onReqAbort):
        (onSyncReqError):
        (start):
        (processStateChange):
        * http/tests/xmlhttprequest/workers/resources/methods.cgi: Copied from LayoutTests/http/tests/xmlhttprequest/methods.cgi.
        * http/tests/xmlhttprequest/workers/resources/methods.js: Added.
        (log):
        (done):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/workers/methods-async-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/workers/methods-async.html [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/workers/methods-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/workers/methods.html [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/workers/resources/methods-async.js [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/workers/resources/methods.cgi [new file with mode: 0755]
LayoutTests/http/tests/xmlhttprequest/workers/resources/methods.js [new file with mode: 0644]
LayoutTests/platform/qt/Skipped
WebCore/ChangeLog
WebCore/bindings/js/JSWorkerContextBase.cpp
WebCore/bindings/js/JSWorkerContextBase.h
WebCore/bindings/js/JSXMLHttpRequestConstructor.cpp
WebCore/bindings/js/JSXMLHttpRequestConstructor.h
WebCore/dom/EventException.idl
WebCore/dom/EventListener.idl
WebCore/loader/WorkerThreadableLoader.cpp
WebCore/loader/WorkerThreadableLoader.h
WebCore/workers/WorkerThread.cpp
WebCore/xml/XMLHttpRequest.idl
WebCore/xml/XMLHttpRequestException.idl
WebCore/xml/XMLHttpRequestProgressEvent.idl
WebCore/xml/XMLHttpRequestUpload.cpp
WebCore/xml/XMLHttpRequestUpload.idl