Remove XMLHttpRequestException
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jan 2016 16:06:32 +0000 (16:06 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jan 2016 16:06:32 +0000 (16:06 +0000)
commit1c956a21189596e91f4cfbf63e0ae00e5e9fe10e
tree9e262164ed46de90fa4cd5bc55bbb281f547d9a5
parent3ca9210947a737a435f7b85bc7696fcd40383447
Remove XMLHttpRequestException
https://bugs.webkit.org/show_bug.cgi?id=102698
<rdar://problem/24338476>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test result now that we throw DOMException.{ABORT, NETWORK, TIMEOUT}Error instead of XMLHttpRequestException.{ABORT, NETWORK, TIMEOUT}_ERR.

* web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt:
* web-platform-tests/XMLHttpRequest/send-non-same-origin.sub-expected.txt:
* web-platform-tests/XMLHttpRequest/send-redirect-bogus-sync-expected.txt:
* web-platform-tests/XMLHttpRequest/send-redirect-infinite-sync-expected.txt:
* web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-sync-expected.txt:

Source/WebCore:

Inspired by a patch by Erik Arvidsson.

As per <https://xhr.spec.whatwg.org> (21 January 2016) and <https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts> (25 January 2016)
XMLHttpRequest and WorkerGlobalScope.importScripts() should throw a DOMException object instead
of a XMLHttpRequestException object when a NetworkError, AbortError, or TimeoutError occur. This
makes the behavior of WebKit more closely conform to these standards as well as the behavior of
other browsers.

* CMakeLists.txt: Remove entries for XMLHttpRequestException.idl and XMLHttpRequestException.cpp.
* DerivedSources.make: Remove entry for XMLHttpRequestException.idl.
* WebCore.order: Remove exported symbols for XMLHttpRequestException.
* WebCore.vcxproj/WebCore.vcxproj: Remove entries for JSXMLHttpRequestException.{cpp, h}, XMLHttpRequestException.{cpp, h}
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSExceptionBase.cpp:
(WebCore::toExceptionBase): Remove logic for XMLHttpRequestException.
* dom/DOMExceptions.in: Remove entry for XMLHttpRequestException.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts): Throw DOMException.NETWORK_ERR instead of XMLHttpRequestException.NETWORK_ERR.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest): Ditto.
(WebCore::XMLHttpRequest::didFail): Throw DOMException.ABORT_ERR instead of XMLHttpRequestException.ABORT_ERR.
(WebCore::XMLHttpRequest::didReachTimeout): Throw DOMException.TIMEOUT_ERR instead of XMLHttpRequestException.TIMEOUT_ERR.
* xml/XMLHttpRequestException.cpp: Removed.
* xml/XMLHttpRequestException.h: Removed.
* xml/XMLHttpRequestException.idl: Removed.

LayoutTests:

Update test result now that we throw DOMException.{ABORT, NETWORK, TIMEOUT}Error instead of XMLHttpRequestException.{ABORT, NETWORK, TIMEOUT}_ERR.

* fast/dom/Window/resources/window-properties.js:
* fast/dom/Window/window-lookup-precedence-expected.txt:
* fast/files/apply-blob-url-to-xhr-expected.txt:
* fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt:
* http/tests/appcache/non-html.xhtml:
* http/tests/appcache/simple.html:
* http/tests/contentextensions/sync-xhr-blocked-expected.txt:
* http/tests/local/fileapi/send-sliced-dragged-file-expected.txt:
* http/tests/workers/worker-importScripts-expected.txt:
* http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt:
* http/tests/xmlhttprequest/XMLHttpRequestException.html:
* http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt:
* http/tests/xmlhttprequest/connection-error-sync-expected.txt:
* http/tests/xmlhttprequest/cross-origin-no-authorization-expected.txt:
* http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-https-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-removal-expected.txt:
* http/tests/xmlhttprequest/workers/access-control-basic-get-fail-non-simple-expected.txt:
* http/tests/xmlhttprequest/xmlhttprequest-sync-no-progress-events-expected.txt:
* http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/TestExpectations:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
57 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/resources/window-properties.js
LayoutTests/fast/dom/Window/window-lookup-precedence-expected.txt
LayoutTests/fast/files/apply-blob-url-to-xhr-expected.txt
LayoutTests/fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt
LayoutTests/http/tests/appcache/non-html.xhtml
LayoutTests/http/tests/appcache/simple.html
LayoutTests/http/tests/contentextensions/sync-xhr-blocked-expected.txt
LayoutTests/http/tests/local/fileapi/send-sliced-dragged-file-expected.txt
LayoutTests/http/tests/workers/worker-importScripts-expected.txt
LayoutTests/http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt
LayoutTests/http/tests/xmlhttprequest/XMLHttpRequestException.html
LayoutTests/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt
LayoutTests/http/tests/xmlhttprequest/access-control-basic-denied-expected.txt
LayoutTests/http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple-expected.txt
LayoutTests/http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached-expected.txt
LayoutTests/http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type-expected.txt
LayoutTests/http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-expected.txt
LayoutTests/http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt
LayoutTests/http/tests/xmlhttprequest/connection-error-sync-expected.txt
LayoutTests/http/tests/xmlhttprequest/cross-origin-no-authorization-expected.txt
LayoutTests/http/tests/xmlhttprequest/origin-exact-matching-expected.txt
LayoutTests/http/tests/xmlhttprequest/origin-whitelisting-https-expected.txt
LayoutTests/http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains-expected.txt
LayoutTests/http/tests/xmlhttprequest/origin-whitelisting-removal-expected.txt
LayoutTests/http/tests/xmlhttprequest/workers/access-control-basic-get-fail-non-simple-expected.txt
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-sync-no-progress-events-expected.txt
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-non-same-origin.sub-expected.txt
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-bogus-sync-expected.txt
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-infinite-sync-expected.txt
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-network-error-sync-expected.txt
LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt
LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.order
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSExceptionBase.cpp
Source/WebCore/dom/DOMExceptions.in
Source/WebCore/workers/WorkerGlobalScope.cpp
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebCore/xml/XMLHttpRequestException.cpp [deleted file]
Source/WebCore/xml/XMLHttpRequestException.h [deleted file]
Source/WebCore/xml/XMLHttpRequestException.idl [deleted file]