Changeset 134345 in webkit
- Timestamp:
- Nov 12, 2012 8:03:41 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 53 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r134343 r134345 1 2012-11-12 Erik Arvidsson <arv@chromium.org> 2 3 Replace DOMException TYPE_MISMATCH_ERR with TypeError 4 https://bugs.webkit.org/show_bug.cgi?id=101604 5 6 Reviewed by Adam Barth. 7 8 Update the tests to test for TypeError instead of DOMException with the TYPE_MISMATCH_ERR code. 9 10 * canvas/philip/tests/2d.drawImage.null.html: 11 * canvas/philip/tests/2d.imageData.put.null.html: 12 * canvas/philip/tests/2d.pattern.image.null.html: 13 * editing/selection/extend-expected.txt: 14 * fast/dom/Geolocation/argument-types-expected.txt: 15 * fast/dom/Geolocation/not-enough-arguments-expected.txt: 16 * fast/dom/Geolocation/script-tests/argument-types.js: 17 * fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt: 18 * fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt: 19 * fast/js/select-options-add-expected.txt: 20 * fast/mediastream/RTCIceCandidate-expected.txt: 21 * fast/mediastream/RTCPeerConnection-expected.txt: 22 * fast/mediastream/RTCSessionDescription-expected.txt: 23 * fast/mediastream/SessionDescription-expected.txt: 24 * fast/mediastream/peerconnection-addstream-expected.txt: 25 * fast/mediastream/peerconnection-iceoptions-expected.txt: 26 * fast/mediastream/peerconnection-iceoptions.html: 27 * fast/mediastream/peerconnection-removestream-expected.txt: 28 * media/encrypted-media/encrypted-media-syntax.html: 29 * media/video-test.js: 30 * platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt: 31 * security/crypto-random-values-types-expected.txt: 32 * svg/dom/SVGTransformList-expected.txt: 33 1 34 2012-11-12 Joshua Bell <jsbell@chromium.org> 2 35 -
trunk/LayoutTests/canvas/philip/tests/2d.drawImage.null.html
r71481 r134345 15 15 try { var _thrown = false; 16 16 ctx.drawImage(null, 0, 0); 17 } catch (e) { if (e. code != DOMException.TYPE_MISMATCH_ERR) _fail("Failed assertion: expected exception of type TYPE_MISMATCH_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TYPE_MISMATCH_ERR: ctx.drawImage(null, 0, 0)"); }17 } catch (e) { if (e.name != "TypeError") _fail("Failed assertion: expected exception of type TypeError, got: "+e.name); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.drawImage(null, 0, 0)"); } 18 18 19 19 -
trunk/LayoutTests/canvas/philip/tests/2d.imageData.put.null.html
r71481 r134345 15 15 try { var _thrown = false; 16 16 ctx.putImageData(null, 0, 0); 17 } catch (e) { if (e. code != DOMException.TYPE_MISMATCH_ERR) _fail("Failed assertion: expected exception of type TYPE_MISMATCH_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TYPE_MISMATCH_ERR: ctx.putImageData(null, 0, 0)"); }17 } catch (e) { if (e.name != "TypeError") _fail("Failed assertion: expected exception of type TypeError, got: "+e.name); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.putImageData(null, 0, 0)"); } 18 18 19 19 -
trunk/LayoutTests/canvas/philip/tests/2d.pattern.image.null.html
r71481 r134345 15 15 try { var _thrown = false; 16 16 ctx.createPattern(null, 'repeat'); 17 } catch (e) { if (e. code != DOMException.TYPE_MISMATCH_ERR) _fail("Failed assertion: expected exception of type TYPE_MISMATCH_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TYPE_MISMATCH_ERR: ctx.createPattern(null, 'repeat')"); }17 } catch (e) { if (e.name != "TypeError") _fail("Failed assertion: expected exception of type TypeError, got: "+e.name); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.createPattern(null, 'repeat')"); } 18 18 19 19 -
trunk/LayoutTests/editing/selection/extend-expected.txt
r29963 r134345 5 5 Success: window.getSelection() is b. 6 6 Success: window.getSelection() is arbaz. 7 Success: s.extend() raised Error: TYPE_MISMATCH_ERR: DOM Exception 17.8 Success: s.extend(null, 0) raised Error: TYPE_MISMATCH_ERR: DOM Exception 17.7 Success: s.extend() raised TypeError: Type error. 8 Success: s.extend(null, 0) raised TypeError: Type error. -
trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt
r120792 r134345 4 4 5 5 6 PASS navigator.geolocation.getCurrentPosition() threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.7 PASS navigator.geolocation.getCurrentPosition(undefined) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.8 PASS navigator.geolocation.getCurrentPosition(null) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.9 PASS navigator.geolocation.getCurrentPosition({}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.10 PASS navigator.geolocation.getCurrentPosition(objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.6 PASS navigator.geolocation.getCurrentPosition() threw exception TypeError: Type error. 7 PASS navigator.geolocation.getCurrentPosition(undefined) threw exception TypeError: Type error. 8 PASS navigator.geolocation.getCurrentPosition(null) threw exception TypeError: Type error. 9 PASS navigator.geolocation.getCurrentPosition({}) threw exception TypeError: Type error. 10 PASS navigator.geolocation.getCurrentPosition(objectThrowingException) threw exception TypeError: Type error. 11 11 PASS navigator.geolocation.getCurrentPosition(emptyFunction) did not throw exception. 12 12 PASS navigator.geolocation.getCurrentPosition(Math.abs) did not throw exception. 13 13 PASS navigator.geolocation.getCurrentPosition(testRunner.setGeolocationPermission) did not throw exception. 14 PASS navigator.geolocation.getCurrentPosition(true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.15 PASS navigator.geolocation.getCurrentPosition(42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.16 PASS navigator.geolocation.getCurrentPosition(Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.17 PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.18 PASS navigator.geolocation.getCurrentPosition("string") threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.14 PASS navigator.geolocation.getCurrentPosition(true) threw exception TypeError: Type error. 15 PASS navigator.geolocation.getCurrentPosition(42) threw exception TypeError: Type error. 16 PASS navigator.geolocation.getCurrentPosition(Infinity) threw exception TypeError: Type error. 17 PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception TypeError: Type error. 18 PASS navigator.geolocation.getCurrentPosition("string") threw exception TypeError: Type error. 19 19 PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined) did not throw exception. 20 20 PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) did not throw exception. 21 PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.22 PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.21 PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception TypeError: Type error. 22 PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception TypeError: Type error. 23 23 PASS navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction) did not throw exception. 24 24 PASS navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs) did not throw exception. 25 25 PASS navigator.geolocation.getCurrentPosition(emptyFunction, testRunner.setGeolocationPermission) did not throw exception. 26 PASS navigator.geolocation.getCurrentPosition(emptyFunction, true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.27 PASS navigator.geolocation.getCurrentPosition(emptyFunction, 42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.28 PASS navigator.geolocation.getCurrentPosition(emptyFunction, Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.29 PASS navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.30 PASS navigator.geolocation.getCurrentPosition(emptyFunction, "string") threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.26 PASS navigator.geolocation.getCurrentPosition(emptyFunction, true) threw exception TypeError: Type error. 27 PASS navigator.geolocation.getCurrentPosition(emptyFunction, 42) threw exception TypeError: Type error. 28 PASS navigator.geolocation.getCurrentPosition(emptyFunction, Infinity) threw exception TypeError: Type error. 29 PASS navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity) threw exception TypeError: Type error. 30 PASS navigator.geolocation.getCurrentPosition(emptyFunction, "string") threw exception TypeError: Type error. 31 31 PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, undefined) did not throw exception. 32 32 PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, null) did not throw exception. -
trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt
r92816 r134345 4 4 5 5 6 PASS window.navigator.geolocation.getCurrentPosition() threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.7 PASS window.navigator.geolocation.watchPosition() threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.6 PASS window.navigator.geolocation.getCurrentPosition() threw exception TypeError: Type error. 7 PASS window.navigator.geolocation.watchPosition() threw exception TypeError: Type error. 8 8 PASS window.navigator.geolocation.clearWatch() threw exception TypeError: Not enough arguments. 9 9 PASS successfullyParsed is true -
trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js
r120792 r134345 14 14 if (expressionShouldThrow) { 15 15 if (expectedException) 16 shouldThrow(expression, ' (function() { return "' + expectedException + '"; })();');16 shouldThrow(expression, '"' + expectedException + '"'); 17 17 else 18 shouldThrow(expression, ' (function() { return "Error: TYPE_MISMATCH_ERR: DOM Exception 17"; })();');18 shouldThrow(expression, '"TypeError: Type error"'); 19 19 } else { 20 20 shouldNotThrow(expression); -
trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt
r110470 r134345 58 58 PASS mySelect.selectedIndex is -1 59 59 19) trying to set an element that's not an option: select element 60 PASS mySelect.options[10] = mySelect; threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.60 PASS mySelect.options[10] = mySelect; threw exception TypeError: Type error. 61 61 PASS mySelect.options.length is 10 62 62 PASS mySelect.selectedIndex is -1 -
trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt
r110470 r134345 58 58 PASS mySelect.selectedIndex is 0 59 59 19) trying to set an element that's not an option: select element 60 PASS mySelect.options[10] = mySelect; threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.60 PASS mySelect.options[10] = mySelect; threw exception TypeError: Type error. 61 61 PASS mySelect.options.length is 10 62 62 PASS mySelect.selectedIndex is 0 -
trunk/LayoutTests/fast/js/select-options-add-expected.txt
r28012 r134345 30 30 31 31 1.4 Add a non-Option element 32 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.32 PASS select1.options.add(option1) threw exception TypeError: Type error. 33 33 PASS select1.options.length is 3 34 34 PASS select1.selectedIndex is 0 35 35 36 36 1.5 Add a non-element (string) 37 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.37 PASS select1.options.add(option1) threw exception TypeError: Type error. 38 38 PASS select1.options.length is 3 39 39 PASS select1.selectedIndex is 0 40 40 41 41 1.6 Add a non-element (number) 42 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.42 PASS select1.options.add(option1) threw exception TypeError: Type error. 43 43 PASS select1.options.length is 3 44 44 PASS select1.selectedIndex is 0 45 45 46 46 1.7 Add a non-element (boolean) 47 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.47 PASS select1.options.add(option1) threw exception TypeError: Type error. 48 48 PASS select1.options.length is 3 49 49 PASS select1.selectedIndex is 0 50 50 51 51 1.8 Add undefined 52 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.52 PASS select1.options.add(option1) threw exception TypeError: Type error. 53 53 PASS select1.options.length is 3 54 54 PASS select1.selectedIndex is 0 55 55 56 56 1.9 Add null 57 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.57 PASS select1.options.add(option1) threw exception TypeError: Type error. 58 58 PASS select1.options.length is 3 59 59 PASS select1.selectedIndex is 0 60 60 61 61 1.10 Add negative infinity 62 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.62 PASS select1.options.add(option1) threw exception TypeError: Type error. 63 63 PASS select1.options.length is 3 64 64 PASS select1.selectedIndex is 0 65 65 66 66 1.11 Add NaN 67 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.67 PASS select1.options.add(option1) threw exception TypeError: Type error. 68 68 PASS select1.options.length is 3 69 69 PASS select1.selectedIndex is 0 70 70 71 71 1.12 Add positive infinity 72 PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.72 PASS select1.options.add(option1) threw exception TypeError: Type error. 73 73 PASS select1.options.length is 3 74 74 PASS select1.selectedIndex is 0 … … 164 164 165 165 2.9 Add an Option at index -Infinity 166 PASS select2.options.add(option2, -1/0) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.166 PASS select2.options.add(option2, -1/0) threw exception TypeError: Type error. 167 167 PASS select2.options.length is 7 168 168 PASS select2.selectedIndex is 1 169 169 170 170 2.10 Add an Option at index NaN 171 PASS select2.options.add(option2, 0/0) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.171 PASS select2.options.add(option2, 0/0) threw exception TypeError: Type error. 172 172 PASS select2.options.length is 7 173 173 PASS select2.selectedIndex is 1 174 174 175 175 2.11 Add an Option at index Infinity 176 PASS select2.options.add(option2, 1/0) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.176 PASS select2.options.add(option2, 1/0) threw exception TypeError: Type error. 177 177 PASS select2.options.length is 7 178 178 PASS select2.selectedIndex is 1 179 179 180 180 2.12 Add a non-Option element 181 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.181 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 182 182 PASS select2.options.length is 7 183 183 PASS select2.selectedIndex is 1 184 184 185 185 2.13 Add a non-element (string) 186 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.186 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 187 187 PASS select2.options.length is 7 188 188 PASS select2.selectedIndex is 1 189 189 190 190 2.14 Add a non-element (number) 191 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.191 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 192 192 PASS select2.options.length is 7 193 193 PASS select2.selectedIndex is 1 194 194 195 195 2.15 Add a non-element (boolean) 196 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.196 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 197 197 PASS select2.options.length is 7 198 198 PASS select2.selectedIndex is 1 199 199 200 200 2.16 Add undefined 201 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.201 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 202 202 PASS select2.options.length is 7 203 203 PASS select2.selectedIndex is 1 204 204 205 205 2.17 Add null 206 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.206 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 207 207 PASS select2.options.length is 7 208 208 PASS select2.selectedIndex is 1 209 209 210 210 2.18 Add negative infinity 211 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.211 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 212 212 PASS select2.options.length is 7 213 213 PASS select2.selectedIndex is 1 214 214 215 215 2.19 Add NaN 216 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.216 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 217 217 PASS select2.options.length is 7 218 218 PASS select2.selectedIndex is 1 219 219 220 220 2.20 Add positive infinity 221 PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.221 PASS select2.options.add(option2, 1) threw exception TypeError: Type error. 222 222 PASS select2.options.length is 7 223 223 PASS select2.selectedIndex is 1 -
trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt
r126779 r134345 13 13 PASS candidate.sdpMid is "bar" 14 14 PASS candidate.sdpMLineIndex is 6 15 PASS new RTCIceCandidate({}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.15 PASS new RTCIceCandidate({}); threw exception TypeError: Type error. 16 16 PASS new RTCIceCandidate(5); threw exception TypeError: Not an object.. 17 17 PASS new RTCIceCandidate("foobar"); threw exception TypeError: Not an object.. -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt
r134245 r134345 15 15 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]}, null); did not throw exception. 16 16 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]}, null); did not throw exception. 17 PASS new webkitRTCPeerConnection({fooServers:[]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.18 PASS new webkitRTCPeerConnection({iceServers:true}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.19 PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.20 PASS new webkitRTCPeerConnection({iceServers:[{}]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.21 PASS new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.17 PASS new webkitRTCPeerConnection({fooServers:[]}, null); threw exception TypeError: Type error. 18 PASS new webkitRTCPeerConnection({iceServers:true}, null); threw exception TypeError: Type error. 19 PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null); threw exception TypeError: Type error. 20 PASS new webkitRTCPeerConnection({iceServers:[{}]}, null); threw exception TypeError: Type error. 21 PASS new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null); threw exception TypeError: Type error. 22 22 PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1}}); did not throw exception. 23 23 PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}}); did not throw exception. … … 29 29 PASS new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported_1:1}}); threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 30 30 PASS new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported_1:1, valid_and_supported_1:1}}); threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 31 PASS new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1:0}}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.32 PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.31 PASS new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1:0}}); threw exception TypeError: Type error. 32 PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]}); threw exception TypeError: Type error. 33 33 PASS new webkitRTCPeerConnection(null, {optional:[{invalid:0}]}); threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 34 PASS new webkitRTCPeerConnection(null, {valid_and_supported_1:1}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.35 PASS new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.36 PASS new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.34 PASS new webkitRTCPeerConnection(null, {valid_and_supported_1:1}); threw exception TypeError: Type error. 35 PASS new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1}); threw exception TypeError: Type error. 36 PASS new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception TypeError: Type error. 37 37 PASS successfullyParsed is true 38 38 -
trunk/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt
r126779 r134345 11 11 PASS sessionDescription.type is "offer" 12 12 PASS sessionDescription.sdp is "foobar" 13 PASS new RTCSessionDescription({}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.13 PASS new RTCSessionDescription({}); threw exception TypeError: Type error. 14 14 PASS new RTCSessionDescription(5); threw exception TypeError: Not an object.. 15 15 PASS new RTCSessionDescription('foobar'); threw exception TypeError: Not an object.. 16 PASS new RTCSessionDescription({type:'foobar', sdp:'x'}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.17 PASS new RTCSessionDescription({type:'offer', sdp:''}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.16 PASS new RTCSessionDescription({type:'foobar', sdp:'x'}); threw exception TypeError: Type error. 17 PASS new RTCSessionDescription({type:'offer', sdp:''}); threw exception TypeError: Type error. 18 18 PASS new RTCSessionDescription({type:'offer', sdp:'x'}); did not throw exception. 19 19 PASS new RTCSessionDescription({type:'answer', sdp:'x'}); did not throw exception. -
trunk/LayoutTests/media/encrypted-media/encrypted-media-syntax-expected.txt
r123409 r134345 26 26 27 27 0-length key is caught before load state is checked. 28 TEST(video.webkitAddKey('webkit-org.w3.clearkey', new Uint8Array())) THROWS( DOMException.TYPE_MISMATCH_ERR) OK28 TEST(video.webkitAddKey('webkit-org.w3.clearkey', new Uint8Array())) THROWS('TypeError') OK 29 29 30 30 Key system validity is not checked before loading. -
trunk/LayoutTests/media/encrypted-media/encrypted-media-syntax.html
r123409 r134345 62 62 63 63 consoleWrite("<br>0-length key is caught before load state is checked."); 64 testE xception("video.webkitAddKey('webkit-org.w3.clearkey', new Uint8Array())", "DOMException.TYPE_MISMATCH_ERR");64 testError("video.webkitAddKey('webkit-org.w3.clearkey', new Uint8Array())", "'TypeError'"); 65 65 66 66 consoleWrite("<br>Key system validity is not checked before loading."); -
trunk/LayoutTests/media/video-test.js
r130670 r134345 212 212 } 213 213 214 function testError(testString, errorName) 215 { 216 try { 217 eval(testString); 218 } catch (ex) { 219 logResult(ex.name == eval(errorName), "TEST(" + testString + ") THROWS("+errorName+")"); 220 } 221 } 222 214 223 var testEnded = false; 215 224 -
trunk/LayoutTests/platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt
r131694 r134345 1 1 Caught expected exception: Error: NOT_SUPPORTED_ERR: DOM Exception 9 2 Caught expected exception: Error: TYPE_MISMATCH_ERR: DOM Exception 172 Caught expected exception: TypeError: Type error 3 3 1 (black) 2 (green) 3 (green) 4 (black) 4 4 -
trunk/LayoutTests/security/crypto-random-values-types-expected.txt
r78435 r134345 12 12 PASS crypto.getRandomValues(new Uint32Array(3)) is undefined. 13 13 PASS crypto.getRandomValues(new Int32Array(3)) is undefined. 14 PASS crypto.getRandomValues(new Float32Array(3)) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.14 PASS crypto.getRandomValues(new Float32Array(3)) threw exception TypeError: Type error. 15 15 PASS successfullyParsed is true 16 16 -
trunk/LayoutTests/svg/dom/SVGTransformList-expected.txt
r89315 r134345 12 12 PASS transform.createSVGTransformFromMatrix(1) threw exception TypeError: Type error. 13 13 PASS transform.createSVGTransformFromMatrix(true) threw exception TypeError: Type error. 14 PASS transform.createSVGTransformFromMatrix(undefined) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.15 PASS transform.createSVGTransformFromMatrix(null) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.14 PASS transform.createSVGTransformFromMatrix(undefined) threw exception TypeError: Type error. 15 PASS transform.createSVGTransformFromMatrix(null) threw exception TypeError: Type error. 16 16 PASS successfullyParsed is true 17 17 -
trunk/Source/WebCore/ChangeLog
r134342 r134345 1 2012-11-12 Erik Arvidsson <arv@chromium.org> 2 3 Replace DOMException TYPE_MISMATCH_ERR with TypeError 4 https://bugs.webkit.org/show_bug.cgi?id=101604 5 6 Reviewed by Adam Barth. 7 8 DOMException.TYPE_MISMATCH_ERR is deprecated in favor of using TypeError. 9 10 We have historically used TYPE_MISMATCH_ERR as a blanket DOMException code when 11 the spec mandates TypeError being thrown. 12 13 Updated existing tests. 14 15 * Modules/mediastream/MediaConstraintsImpl.cpp: 16 * Modules/mediastream/MediaStreamTrackList.cpp: 17 * Modules/mediastream/PeerConnection00.cpp: 18 * Modules/mediastream/RTCDataChannel.cpp: 19 * Modules/mediastream/RTCIceCandidate.cpp: 20 * Modules/mediastream/RTCPeerConnection.cpp: 21 * Modules/mediastream/RTCSessionDescription.cpp: 22 * Modules/mediastream/SessionDescription.cpp: 23 * bindings/js/CallbackFunction.cpp: 24 * bindings/js/JSCustomXPathNSResolver.cpp: 25 * bindings/js/JSHTMLOptionsCollectionCustom.cpp: 26 * bindings/js/JSHTMLSelectElementCustom.cpp: 27 * bindings/js/JSMutationObserverCustom.cpp: 28 * bindings/js/JSSQLResultSetRowListCustom.cpp: 29 * bindings/js/JSSQLTransactionCustom.cpp: 30 * bindings/js/JSSQLTransactionSyncCustom.cpp: 31 * bindings/scripts/CodeGeneratorJS.pm: 32 * bindings/scripts/CodeGeneratorObjC.pm: 33 * bindings/scripts/CodeGeneratorV8.pm: 34 * bindings/v8/V8Callback.h: 35 * bindings/v8/V8Collection.cpp: 36 * bindings/v8/custom/V8DocumentCustom.cpp: 37 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: 38 * bindings/v8/custom/V8MutationObserverCustom.cpp: 39 * bindings/v8/custom/V8SQLTransactionCustom.cpp: 40 * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: 41 * dom/DOMCoreException.idl: 42 * html/HTMLElement.cpp: 43 * html/HTMLMediaElement.cpp: 44 * html/HTMLOptionsCollection.cpp: 45 * html/canvas/CanvasRenderingContext2D.cpp: 46 * page/Crypto.cpp: 47 * page/DOMSelection.cpp: 48 * svg/properties/SVGTransformListPropertyTearOff.h: 49 1 50 2012-11-12 Joshua Bell <jsbell@chromium.org> 2 51 -
trunk/Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp
r134245 r134345 46 46 RefPtr<MediaConstraintsImpl> object = adoptRef(new MediaConstraintsImpl()); 47 47 if (!object->initialize(constraints)) { 48 ec = TYPE_MISMATCH_ERR;48 ec = NATIVE_TYPE_ERR; 49 49 return 0; 50 50 } -
trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackList.cpp
r127485 r134345 81 81 RefPtr<MediaStreamTrack> track = prpTrack; 82 82 if (!track) { 83 ec = TYPE_MISMATCH_ERR;83 ec = NATIVE_TYPE_ERR; 84 84 return; 85 85 } … … 106 106 RefPtr<MediaStreamTrack> track = prpTrack; 107 107 if (!track) { 108 ec = TYPE_MISMATCH_ERR;108 ec = NATIVE_TYPE_ERR; 109 109 return; 110 110 } -
trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
r134207 r134345 125 125 m_binaryType = BinaryTypeArrayBuffer; 126 126 else 127 ec = TYPE_MISMATCH_ERR;127 ec = NATIVE_TYPE_ERR; 128 128 } 129 129 -
trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp
r126779 r134345 47 47 bool ok = dictionary.get("candidate", candidate); 48 48 if (!ok || !candidate.length()) { 49 ec = TYPE_MISMATCH_ERR;49 ec = NATIVE_TYPE_ERR; 50 50 return 0; 51 51 } -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
r134093 r134345 70 70 bool ok = configuration.get("iceServers", iceServers); 71 71 if (!ok || iceServers.isUndefinedOrNull()) { 72 ec = TYPE_MISMATCH_ERR;72 ec = NATIVE_TYPE_ERR; 73 73 return 0; 74 74 } … … 77 77 ok = iceServers.length(numberOfServers); 78 78 if (!ok) { 79 ec = TYPE_MISMATCH_ERR;79 ec = NATIVE_TYPE_ERR; 80 80 return 0; 81 81 } … … 87 87 ok = iceServers.get(i, iceServer); 88 88 if (!ok) { 89 ec = TYPE_MISMATCH_ERR;89 ec = NATIVE_TYPE_ERR; 90 90 return 0; 91 91 } … … 94 94 ok = iceServer.get("url", urlString); 95 95 if (!ok) { 96 ec = TYPE_MISMATCH_ERR;96 ec = NATIVE_TYPE_ERR; 97 97 return 0; 98 98 } 99 99 KURL url(KURL(), urlString); 100 100 if (!url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun"))) { 101 ec = TYPE_MISMATCH_ERR;101 ec = NATIVE_TYPE_ERR; 102 102 return 0; 103 103 } … … 171 171 172 172 if (!successCallback) { 173 ec = TYPE_MISMATCH_ERR;173 ec = NATIVE_TYPE_ERR; 174 174 return; 175 175 } … … 191 191 192 192 if (!successCallback) { 193 ec = TYPE_MISMATCH_ERR;193 ec = NATIVE_TYPE_ERR; 194 194 return; 195 195 } … … 212 212 RefPtr<RTCSessionDescription> sessionDescription = prpSessionDescription; 213 213 if (!sessionDescription) { 214 ec = TYPE_MISMATCH_ERR;214 ec = NATIVE_TYPE_ERR; 215 215 return; 216 216 } … … 244 244 RefPtr<RTCSessionDescription> sessionDescription = prpSessionDescription; 245 245 if (!sessionDescription) { 246 ec = TYPE_MISMATCH_ERR;246 ec = NATIVE_TYPE_ERR; 247 247 return; 248 248 } … … 295 295 296 296 if (!iceCandidate) { 297 ec = TYPE_MISMATCH_ERR;297 ec = NATIVE_TYPE_ERR; 298 298 return; 299 299 } … … 357 357 RefPtr<MediaStream> stream = prpStream; 358 358 if (!stream) { 359 ec = TYPE_MISMATCH_ERR;359 ec = NATIVE_TYPE_ERR; 360 360 return; 361 361 } … … 383 383 384 384 if (!stream) { 385 ec = TYPE_MISMATCH_ERR;385 ec = NATIVE_TYPE_ERR; 386 386 return; 387 387 } -
trunk/Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp
r126779 r134345 51 51 bool ok = dictionary.get("type", type); 52 52 if (!ok || !verifyType(type)) { 53 ec = TYPE_MISMATCH_ERR;53 ec = NATIVE_TYPE_ERR; 54 54 return 0; 55 55 } … … 58 58 ok = dictionary.get("sdp", sdp); 59 59 if (!ok || sdp.isEmpty()) { 60 ec = TYPE_MISMATCH_ERR;60 ec = NATIVE_TYPE_ERR; 61 61 return 0; 62 62 } … … 90 90 m_descriptor->setType(type); 91 91 else 92 ec = TYPE_MISMATCH_ERR;92 ec = NATIVE_TYPE_ERR; 93 93 } 94 94 -
trunk/Source/WebCore/bindings/js/CallbackFunction.cpp
r95901 r134345 42 42 JSC::CallData callData; 43 43 if (getCallData(value, callData) == JSC::CallTypeNone) { 44 setDOMException(exec, TYPE_MISMATCH_ERR);44 setDOMException(exec, NATIVE_TYPE_ERR); 45 45 return false; 46 46 } -
trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp
r127191 r134345 47 47 JSObject* resolverObject = value.getObject(); 48 48 if (!resolverObject) { 49 setDOMException(exec, TYPE_MISMATCH_ERR);49 setDOMException(exec, NATIVE_TYPE_ERR); 50 50 return 0; 51 51 } -
trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
r134248 r134345 75 75 return jsUndefined(); 76 76 if (!ok) 77 ec = TYPE_MISMATCH_ERR;77 ec = NATIVE_TYPE_ERR; 78 78 else 79 79 imp->add(option, index, ec); -
trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp
r97533 r134345 54 54 HTMLOptionElement* option = toHTMLOptionElement(value); 55 55 if (!option) 56 ec = TYPE_MISMATCH_ERR;56 ec = NATIVE_TYPE_ERR; 57 57 else 58 58 select->setOption(index, option, ec); -
trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp
r122159 r134345 50 50 JSObject* object = exec->argument(0).getObject(); 51 51 if (!object) { 52 setDOMException(exec, TYPE_MISMATCH_ERR);52 setDOMException(exec, NATIVE_TYPE_ERR); 53 53 return JSValue::encode(jsUndefined()); 54 54 } -
trunk/Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp
r127191 r134345 46 46 int index = finiteInt32Value(exec->argument(0), exec, indexOk); 47 47 if (!indexOk) { 48 setDOMException(exec, TYPE_MISMATCH_ERR);48 setDOMException(exec, NATIVE_TYPE_ERR); 49 49 return jsUndefined(); 50 50 } -
trunk/Source/WebCore/bindings/js/JSSQLTransactionCustom.cpp
r127191 r134345 60 60 JSObject* object = exec->argument(1).getObject(); 61 61 if (!object) { 62 setDOMException(exec, TYPE_MISMATCH_ERR);62 setDOMException(exec, NATIVE_TYPE_ERR); 63 63 return jsUndefined(); 64 64 } … … 93 93 JSObject* object = exec->argument(2).getObject(); 94 94 if (!object) { 95 setDOMException(exec, TYPE_MISMATCH_ERR);95 setDOMException(exec, NATIVE_TYPE_ERR); 96 96 return jsUndefined(); 97 97 } … … 104 104 JSObject* object = exec->argument(3).getObject(); 105 105 if (!object) { 106 setDOMException(exec, TYPE_MISMATCH_ERR);106 setDOMException(exec, NATIVE_TYPE_ERR); 107 107 return jsUndefined(); 108 108 } -
trunk/Source/WebCore/bindings/js/JSSQLTransactionSyncCustom.cpp
r127191 r134345 59 59 JSObject* object = exec->argument(1).getObject(); 60 60 if (!object) { 61 setDOMException(exec, TYPE_MISMATCH_ERR);61 setDOMException(exec, NATIVE_TYPE_ERR); 62 62 return jsUndefined(); 63 63 } -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r134221 r134345 2785 2785 if ($codeGenerator->IsSVGTypeNeedingTearOff($argType) and not $implClassName =~ /List$/) { 2786 2786 push(@$outputArray, " if (!$name) {\n"); 2787 push(@$outputArray, " setDOMException(exec, TYPE_MISMATCH_ERR);\n");2787 push(@$outputArray, " setDOMException(exec, NATIVE_TYPE_ERR);\n"); 2788 2788 push(@$outputArray, " return JSValue::encode(jsUndefined());\n"); 2789 2789 push(@$outputArray, " }\n"); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r127032 r134345 1592 1592 push(@functionContent, " $idlTypeWithNamespace* ${paramName}Core = $implGetter;\n"); 1593 1593 push(@functionContent, " if (!${paramName}Core) {\n"); 1594 push(@functionContent, " WebCore::ExceptionCode ec = WebCore:: TYPE_MISMATCH_ERR;\n");1594 push(@functionContent, " WebCore::ExceptionCode ec = WebCore::NATIVE_TYPE_ERR;\n"); 1595 1595 push(@functionContent, " $exceptionRaiseOnError\n"); 1596 1596 if ($returnType eq "void") { -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r134323 r134345 3592 3592 push @arguments, "$paramName->propertyReference()"; 3593 3593 $result .= $indent . "if (!$paramName)\n"; 3594 $result .= $indent . " return setDOMException(WebCore:: TYPE_MISMATCH_ERR, args.GetIsolate());\n";3594 $result .= $indent . " return setDOMException(WebCore::NATIVE_TYPE_ERR, args.GetIsolate());\n"; 3595 3595 } elsif ($parameter->type eq "SVGMatrix" and $implClassName eq "SVGTransformList") { 3596 3596 push @arguments, "$paramName.get()"; -
trunk/Source/WebCore/bindings/v8/V8Callback.h
r129970 r134345 64 64 if (!value->IsFunction()) { 65 65 succeeded = false; 66 setDOMException( TYPE_MISMATCH_ERR, isolate);66 setDOMException(NATIVE_TYPE_ERR, isolate); 67 67 return 0; 68 68 } -
trunk/Source/WebCore/bindings/v8/V8Collection.cpp
r125495 r134345 47 47 ExceptionCode ec = 0; 48 48 49 // Check that the value is an HTMLOptionElement. If not, throw a TYPE_MISMATCH_ERR DOMException.49 // Check that the value is an HTMLOptionElement. If not, throw a TypeError. 50 50 if (!V8HTMLOptionElement::HasInstance(value)) { 51 setDOMException( TYPE_MISMATCH_ERR, isolate);51 setDOMException(NATIVE_TYPE_ERR, isolate); 52 52 return value; 53 53 } -
trunk/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
r134089 r134345 78 78 RefPtr<XPathNSResolver> resolver = toXPathNSResolver(args[2]); 79 79 if (!resolver && !args[2]->IsNull() && !args[2]->IsUndefined()) 80 return setDOMException( TYPE_MISMATCH_ERR, args.GetIsolate());80 return setDOMException(NATIVE_TYPE_ERR, args.GetIsolate()); 81 81 82 82 int type = toInt32(args[3]); -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
r134248 r134345 56 56 INC_STATS("DOM.HTMLOptionsCollection.add()"); 57 57 if (!V8HTMLOptionElement::HasInstance(args[0])) 58 return setDOMException( TYPE_MISMATCH_ERR, args.GetIsolate());58 return setDOMException(NATIVE_TYPE_ERR, args.GetIsolate()); 59 59 HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder()); 60 60 HTMLOptionElement* option = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>(v8::Handle<v8::Object>::Cast(args[0]))); … … 72 72 73 73 if (!ok) 74 ec = TYPE_MISMATCH_ERR;74 ec = NATIVE_TYPE_ERR; 75 75 else 76 76 imp->add(option, index, ec); -
trunk/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp
r128139 r134345 59 59 v8::Local<v8::Value> arg = args[0]; 60 60 if (!arg->IsObject()) 61 return setDOMException( TYPE_MISMATCH_ERR, args.GetIsolate());61 return setDOMException(NATIVE_TYPE_ERR, args.GetIsolate()); 62 62 63 63 ScriptExecutionContext* context = getScriptExecutionContext(); -
trunk/Source/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
r128139 r134345 60 60 if (args.Length() > 1 && !isUndefinedOrNull(args[1])) { 61 61 if (!args[1]->IsObject()) 62 return setDOMException( TYPE_MISMATCH_ERR, args.GetIsolate());62 return setDOMException(NATIVE_TYPE_ERR, args.GetIsolate()); 63 63 64 64 uint32_t sqlArgsLength = 0; … … 94 94 if (args.Length() > 2 && !isUndefinedOrNull(args[2])) { 95 95 if (!args[2]->IsObject()) 96 return setDOMException( TYPE_MISMATCH_ERR, args.GetIsolate());96 return setDOMException(NATIVE_TYPE_ERR, args.GetIsolate()); 97 97 callback = V8SQLStatementCallback::create(args[2], scriptExecutionContext); 98 98 } … … 101 101 if (args.Length() > 3 && !isUndefinedOrNull(args[3])) { 102 102 if (!args[3]->IsObject()) 103 return setDOMException( TYPE_MISMATCH_ERR, args.GetIsolate());103 return setDOMException(NATIVE_TYPE_ERR, args.GetIsolate()); 104 104 errorCallback = V8SQLStatementErrorCallback::create(args[3], scriptExecutionContext); 105 105 } -
trunk/Source/WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp
r127946 r134345 60 60 if (args.Length() > 1 && !isUndefinedOrNull(args[1])) { 61 61 if (!args[1]->IsObject()) 62 return setDOMException( TYPE_MISMATCH_ERR, args.GetIsolate());62 return setDOMException(NATIVE_TYPE_ERR, args.GetIsolate()); 63 63 64 64 uint32_t sqlArgsLength = 0; -
trunk/Source/WebCore/dom/DOMCoreException.idl
r131172 r134345 66 66 const unsigned short VALIDATION_ERR = 16; 67 67 // Introduced in DOM Level 3: 68 // Deprecated in DOM Living Standard 68 69 const unsigned short TYPE_MISMATCH_ERR = 17; 69 70 // Introduced as an XHR extension: -
trunk/Source/WebCore/html/HTMLElement.cpp
r134322 r134345 547 547 { 548 548 if (!newChild) { 549 // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.550 ec = TYPE_MISMATCH_ERR;549 // IE throws an Error with the message "Invalid argument.". 550 ec = NATIVE_TYPE_ERR; 551 551 return 0; 552 552 } -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r133806 r134345 2467 2467 2468 2468 if (!key->length()) { 2469 ec = TYPE_MISMATCH_ERR;2469 ec = NATIVE_TYPE_ERR; 2470 2470 return; 2471 2471 } -
trunk/Source/WebCore/html/HTMLOptionsCollection.cpp
r123281 r134345 49 49 50 50 if (!newOption) { 51 ec = TYPE_MISMATCH_ERR;51 ec = NATIVE_TYPE_ERR; 52 52 return; 53 53 } -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r128116 r134345 1307 1307 { 1308 1308 if (!image) { 1309 ec = TYPE_MISMATCH_ERR;1309 ec = NATIVE_TYPE_ERR; 1310 1310 return; 1311 1311 } … … 1318 1318 { 1319 1319 if (!image) { 1320 ec = TYPE_MISMATCH_ERR;1320 ec = NATIVE_TYPE_ERR; 1321 1321 return; 1322 1322 } … … 1340 1340 { 1341 1341 if (!image) { 1342 ec = TYPE_MISMATCH_ERR;1342 ec = NATIVE_TYPE_ERR; 1343 1343 return; 1344 1344 } … … 1417 1417 { 1418 1418 if (!sourceCanvas) { 1419 ec = TYPE_MISMATCH_ERR;1419 ec = NATIVE_TYPE_ERR; 1420 1420 return; 1421 1421 } … … 1482 1482 { 1483 1483 if (!video) { 1484 ec = TYPE_MISMATCH_ERR;1484 ec = NATIVE_TYPE_ERR; 1485 1485 return; 1486 1486 } … … 1493 1493 { 1494 1494 if (!video) { 1495 ec = TYPE_MISMATCH_ERR;1495 ec = NATIVE_TYPE_ERR; 1496 1496 return; 1497 1497 } … … 1511 1511 { 1512 1512 if (!video) { 1513 ec = TYPE_MISMATCH_ERR;1513 ec = NATIVE_TYPE_ERR; 1514 1514 return; 1515 1515 } … … 1755 1755 { 1756 1756 if (!image) { 1757 ec = TYPE_MISMATCH_ERR;1757 ec = NATIVE_TYPE_ERR; 1758 1758 return 0; 1759 1759 } … … 1779 1779 { 1780 1780 if (!canvas) { 1781 ec = TYPE_MISMATCH_ERR;1781 ec = NATIVE_TYPE_ERR; 1782 1782 return 0; 1783 1783 } … … 1956 1956 { 1957 1957 if (!data) { 1958 ec = TYPE_MISMATCH_ERR;1958 ec = NATIVE_TYPE_ERR; 1959 1959 return; 1960 1960 } … … 1965 1965 { 1966 1966 if (!data) { 1967 ec = TYPE_MISMATCH_ERR;1967 ec = NATIVE_TYPE_ERR; 1968 1968 return; 1969 1969 } … … 1986 1986 { 1987 1987 if (!data) { 1988 ec = TYPE_MISMATCH_ERR;1988 ec = NATIVE_TYPE_ERR; 1989 1989 return; 1990 1990 } -
trunk/Source/WebCore/page/Crypto.cpp
r126953 r134345 61 61 #if USE(OS_RANDOMNESS) 62 62 if (!array || !isIntegerArray(array)) { 63 ec = TYPE_MISMATCH_ERR;63 ec = NATIVE_TYPE_ERR; 64 64 return; 65 65 } -
trunk/Source/WebCore/page/DOMSelection.cpp
r130124 r134345 337 337 338 338 if (!node) { 339 ec = TYPE_MISMATCH_ERR;339 ec = NATIVE_TYPE_ERR; 340 340 return; 341 341 } -
trunk/Source/WebCore/svg/properties/SVGTransformListPropertyTearOff.h
r110835 r134345 43 43 ASSERT(m_values); 44 44 if (!matrix) { 45 ec = TYPE_MISMATCH_ERR;45 ec = NATIVE_TYPE_ERR; 46 46 return 0; 47 47 }
Note: See TracChangeset
for help on using the changeset viewer.