Replace DOMException TYPE_MISMATCH_ERR with TypeError
authorarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 04:03:41 +0000 (04:03 +0000)
committerarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 04:03:41 +0000 (04:03 +0000)
commit54596890344173b9de282ab7994d95277c65478f
tree567d7a7559a5bf4a8ef2d300572e2f5903055eb3
parentc76883cca6cd9c3ad8dedcb587fddfdbcfee9876
Replace DOMException TYPE_MISMATCH_ERR with TypeError
https://bugs.webkit.org/show_bug.cgi?id=101604

Reviewed by Adam Barth.

Source/WebCore:

DOMException.TYPE_MISMATCH_ERR is deprecated in favor of using TypeError.

We have historically used TYPE_MISMATCH_ERR as a blanket DOMException code when
the spec mandates TypeError being thrown.

Updated existing tests.

* Modules/mediastream/MediaConstraintsImpl.cpp:
* Modules/mediastream/MediaStreamTrackList.cpp:
* Modules/mediastream/PeerConnection00.cpp:
* Modules/mediastream/RTCDataChannel.cpp:
* Modules/mediastream/RTCIceCandidate.cpp:
* Modules/mediastream/RTCPeerConnection.cpp:
* Modules/mediastream/RTCSessionDescription.cpp:
* Modules/mediastream/SessionDescription.cpp:
* bindings/js/CallbackFunction.cpp:
* bindings/js/JSCustomXPathNSResolver.cpp:
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
* bindings/js/JSHTMLSelectElementCustom.cpp:
* bindings/js/JSMutationObserverCustom.cpp:
* bindings/js/JSSQLResultSetRowListCustom.cpp:
* bindings/js/JSSQLTransactionCustom.cpp:
* bindings/js/JSSQLTransactionSyncCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/v8/V8Callback.h:
* bindings/v8/V8Collection.cpp:
* bindings/v8/custom/V8DocumentCustom.cpp:
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
* bindings/v8/custom/V8MutationObserverCustom.cpp:
* bindings/v8/custom/V8SQLTransactionCustom.cpp:
* bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
* dom/DOMCoreException.idl:
* html/HTMLElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLOptionsCollection.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
* page/Crypto.cpp:
* page/DOMSelection.cpp:
* svg/properties/SVGTransformListPropertyTearOff.h:

LayoutTests:

Update the tests to test for TypeError instead of DOMException with the TYPE_MISMATCH_ERR code.

* canvas/philip/tests/2d.drawImage.null.html:
* canvas/philip/tests/2d.imageData.put.null.html:
* canvas/philip/tests/2d.pattern.image.null.html:
* editing/selection/extend-expected.txt:
* fast/dom/Geolocation/argument-types-expected.txt:
* fast/dom/Geolocation/not-enough-arguments-expected.txt:
* fast/dom/Geolocation/script-tests/argument-types.js:
* fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
* fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
* fast/js/select-options-add-expected.txt:
* fast/mediastream/RTCIceCandidate-expected.txt:
* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCSessionDescription-expected.txt:
* fast/mediastream/SessionDescription-expected.txt:
* fast/mediastream/peerconnection-addstream-expected.txt:
* fast/mediastream/peerconnection-iceoptions-expected.txt:
* fast/mediastream/peerconnection-iceoptions.html:
* fast/mediastream/peerconnection-removestream-expected.txt:
* media/encrypted-media/encrypted-media-syntax.html:
* media/video-test.js:
* platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt:
* security/crypto-random-values-types-expected.txt:
* svg/dom/SVGTransformList-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
53 files changed:
LayoutTests/ChangeLog
LayoutTests/canvas/philip/tests/2d.drawImage.null.html
LayoutTests/canvas/philip/tests/2d.imageData.put.null.html
LayoutTests/canvas/philip/tests/2d.pattern.image.null.html
LayoutTests/editing/selection/extend-expected.txt
LayoutTests/fast/dom/Geolocation/argument-types-expected.txt
LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt
LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js
LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt
LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt
LayoutTests/fast/js/select-options-add-expected.txt
LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt
LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt
LayoutTests/media/encrypted-media/encrypted-media-syntax-expected.txt
LayoutTests/media/encrypted-media/encrypted-media-syntax.html
LayoutTests/media/video-test.js
LayoutTests/platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt
LayoutTests/security/crypto-random-values-types-expected.txt
LayoutTests/svg/dom/SVGTransformList-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrackList.cpp
Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp
Source/WebCore/bindings/js/CallbackFunction.cpp
Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp
Source/WebCore/bindings/js/JSMutationObserverCustom.cpp
Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp
Source/WebCore/bindings/js/JSSQLTransactionCustom.cpp
Source/WebCore/bindings/js/JSSQLTransactionSyncCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/v8/V8Callback.h
Source/WebCore/bindings/v8/V8Collection.cpp
Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp
Source/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
Source/WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp
Source/WebCore/dom/DOMCoreException.idl
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLOptionsCollection.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/page/Crypto.cpp
Source/WebCore/page/DOMSelection.cpp
Source/WebCore/svg/properties/SVGTransformListPropertyTearOff.h