Changeset 161058 in webkit
- Timestamp:
- Dec 24, 2013 12:43:03 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r161056 r161058 1 2013-12-24 Ryosuke Niwa <rniwa@webkit.org> 2 3 Unreviewed, rolling out r161051. 4 http://trac.webkit.org/changeset/161051 5 https://bugs.webkit.org/show_bug.cgi?id=45994 6 7 Caused two DFG tests to hit assertions due to a separate bug 8 9 * http/tests/xmlhttprequest/exceptions-expected.txt: 10 * http/tests/xmlhttprequest/exceptions.html: 11 * http/tests/xmlhttprequest/status-after-abort-expected.txt: 12 * http/tests/xmlhttprequest/zero-length-response-expected.txt: 13 * js/dom/dfg-custom-getter-throw-expected.txt: 14 * js/dom/script-tests/dfg-custom-getter-throw-inlined.js: 15 (foo): 16 (bar): 17 * js/dom/script-tests/dfg-custom-getter-throw.js: 18 (foo): 19 (bar): 20 1 21 2013-12-24 Radu Stavila <stavila@adobe.com> 2 22 -
trunk/LayoutTests/http/tests/xmlhttprequest/exceptions-expected.txt
r161051 r161058 7 7 PASS: req.setRequestHeader() threw exception TypeError: Not enough arguments. 8 8 PASS: req.setRequestHeader("Foo") threw exception TypeError: Not enough arguments. 9 PASS: req.status() threw exception Error: InvalidStateError: DOM Exception 11. 10 PASS: req.statusText() threw exception Error: InvalidStateError: DOM Exception 11. 9 11 send() 10 12 PASS: req.send(null) threw exception Error: InvalidStateError: DOM Exception 11. -
trunk/LayoutTests/http/tests/xmlhttprequest/exceptions.html
r161051 r161058 65 65 shouldThrow('req.setRequestHeader()'); 66 66 shouldThrow('req.setRequestHeader("Foo")'); 67 shouldThrow('req.status()'); 68 shouldThrow('req.statusText()'); 67 69 68 70 req.send(null); -
trunk/LayoutTests/http/tests/xmlhttprequest/status-after-abort-expected.txt
r161051 r161058 3 3 A newly created request. Response status: 0; statusText: ''; readyState: 0 4 4 Opening... 5 Onreadystatechange. Response status: 0; statusText: ''; readyState: 16 Opened request. Response status: 0; statusText: ''; readyState: 17 Sent request. Response status: 0; statusText: ''; readyState: 15 Onreadystatechange. Response status: [exception]; statusText: '[exception]'; readyState: 1 6 Opened request. Response status: [exception]; statusText: '[exception]'; readyState: 1 7 Sent request. Response status: [exception]; statusText: '[exception]'; readyState: 1 8 8 Onreadystatechange. Response status: 200; statusText: 'OK'; readyState: 2 9 9 Onreadystatechange. Response status: 200; statusText: 'OK'; readyState: 3 10 10 Onreadystatechange. Response status: 200; statusText: 'OK'; readyState: 4 11 11 Aborting the request... 12 After aborting the request. Response status: 0; statusText: ''; readyState: 012 After aborting the request. Response status: 200; statusText: 'OK'; readyState: 0 13 13 Reopening the request to check that the status is reset... 14 Onreadystatechange. Response status: 0; statusText: ''; readyState: 114 Onreadystatechange. Response status: [exception]; statusText: '[exception]'; readyState: 1 15 15 Done. 16 16 -
trunk/LayoutTests/http/tests/xmlhttprequest/zero-length-response-expected.txt
r161051 r161058 9 9 after setting onreadystatechange: Uninitialized 10 10 onreadystatechange: Open 11 Status: 012 StatusText: ""11 Exception getting status: InvalidStateError: DOM Exception 11 12 Exception getting StatusText: InvalidStateError: DOM Exception 11 13 13 ResponseText: "" 14 14 ResponseXML: null 15 15 ResponseXML serialized: n/a 16 16 after open(): Open 17 Status: 018 StatusText: ""17 Exception getting status: InvalidStateError: DOM Exception 11 18 Exception getting StatusText: InvalidStateError: DOM Exception 11 19 19 ResponseText: "" 20 20 ResponseXML: null -
trunk/LayoutTests/js/dom/dfg-custom-getter-throw-expected.txt
r161051 r161058 4 4 5 5 6 PASS bar(i >= 100) is "Returned result: "7 PASS bar(i >= 100) is "Returned result: "8 PASS bar(i >= 100) is "Returned result: "9 PASS bar(i >= 100) is "Returned result: "10 PASS bar(i >= 100) is "Returned result: "11 PASS bar(i >= 100) is "Returned result: "12 PASS bar(i >= 100) is "Returned result: "13 PASS bar(i >= 100) is "Returned result: "14 PASS bar(i >= 100) is "Returned result: "15 PASS bar(i >= 100) is "Returned result: "16 PASS bar(i >= 100) is "Returned result: "17 PASS bar(i >= 100) is "Returned result: "18 PASS bar(i >= 100) is "Returned result: "19 PASS bar(i >= 100) is "Returned result: "20 PASS bar(i >= 100) is "Returned result: "21 PASS bar(i >= 100) is "Returned result: "22 PASS bar(i >= 100) is "Returned result: "23 PASS bar(i >= 100) is "Returned result: "24 PASS bar(i >= 100) is "Returned result: "25 PASS bar(i >= 100) is "Returned result: "26 PASS bar(i >= 100) is "Returned result: "27 PASS bar(i >= 100) is "Returned result: "28 PASS bar(i >= 100) is "Returned result: "29 PASS bar(i >= 100) is "Returned result: "30 PASS bar(i >= 100) is "Returned result: "31 PASS bar(i >= 100) is "Returned result: "32 PASS bar(i >= 100) is "Returned result: "33 PASS bar(i >= 100) is "Returned result: "34 PASS bar(i >= 100) is "Returned result: "35 PASS bar(i >= 100) is "Returned result: "36 PASS bar(i >= 100) is "Returned result: "37 PASS bar(i >= 100) is "Returned result: "38 PASS bar(i >= 100) is "Returned result: "39 PASS bar(i >= 100) is "Returned result: "40 PASS bar(i >= 100) is "Returned result: "41 PASS bar(i >= 100) is "Returned result: "42 PASS bar(i >= 100) is "Returned result: "43 PASS bar(i >= 100) is "Returned result: "44 PASS bar(i >= 100) is "Returned result: "45 PASS bar(i >= 100) is "Returned result: "46 PASS bar(i >= 100) is "Returned result: "47 PASS bar(i >= 100) is "Returned result: "48 PASS bar(i >= 100) is "Returned result: "49 PASS bar(i >= 100) is "Returned result: "50 PASS bar(i >= 100) is "Returned result: "51 PASS bar(i >= 100) is "Returned result: "52 PASS bar(i >= 100) is "Returned result: "53 PASS bar(i >= 100) is "Returned result: "54 PASS bar(i >= 100) is "Returned result: "55 PASS bar(i >= 100) is "Returned result: "56 PASS bar(i >= 100) is "Returned result: "57 PASS bar(i >= 100) is "Returned result: "58 PASS bar(i >= 100) is "Returned result: "59 PASS bar(i >= 100) is "Returned result: "60 PASS bar(i >= 100) is "Returned result: "61 PASS bar(i >= 100) is "Returned result: "62 PASS bar(i >= 100) is "Returned result: "63 PASS bar(i >= 100) is "Returned result: "64 PASS bar(i >= 100) is "Returned result: "65 PASS bar(i >= 100) is "Returned result: "66 PASS bar(i >= 100) is "Returned result: "67 PASS bar(i >= 100) is "Returned result: "68 PASS bar(i >= 100) is "Returned result: "69 PASS bar(i >= 100) is "Returned result: "70 PASS bar(i >= 100) is "Returned result: "71 PASS bar(i >= 100) is "Returned result: "72 PASS bar(i >= 100) is "Returned result: "73 PASS bar(i >= 100) is "Returned result: "74 PASS bar(i >= 100) is "Returned result: "75 PASS bar(i >= 100) is "Returned result: "76 PASS bar(i >= 100) is "Returned result: "77 PASS bar(i >= 100) is "Returned result: "78 PASS bar(i >= 100) is "Returned result: "79 PASS bar(i >= 100) is "Returned result: "80 PASS bar(i >= 100) is "Returned result: "81 PASS bar(i >= 100) is "Returned result: "82 PASS bar(i >= 100) is "Returned result: "83 PASS bar(i >= 100) is "Returned result: "84 PASS bar(i >= 100) is "Returned result: "85 PASS bar(i >= 100) is "Returned result: "86 PASS bar(i >= 100) is "Returned result: "87 PASS bar(i >= 100) is "Returned result: "88 PASS bar(i >= 100) is "Returned result: "89 PASS bar(i >= 100) is "Returned result: "90 PASS bar(i >= 100) is "Returned result: "91 PASS bar(i >= 100) is "Returned result: "92 PASS bar(i >= 100) is "Returned result: "93 PASS bar(i >= 100) is "Returned result: "94 PASS bar(i >= 100) is "Returned result: "95 PASS bar(i >= 100) is "Returned result: "96 PASS bar(i >= 100) is "Returned result: "97 PASS bar(i >= 100) is "Returned result: "98 PASS bar(i >= 100) is "Returned result: "99 PASS bar(i >= 100) is "Returned result: "100 PASS bar(i >= 100) is "Returned result: "101 PASS bar(i >= 100) is "Returned result: "102 PASS bar(i >= 100) is "Returned result: "103 PASS bar(i >= 100) is "Returned result: "104 PASS bar(i >= 100) is "Returned result: "105 PASS bar(i >= 100) is "Returned result: "6 PASS bar(i >= 100) is "Returned result: 0" 7 PASS bar(i >= 100) is "Returned result: 0" 8 PASS bar(i >= 100) is "Returned result: 0" 9 PASS bar(i >= 100) is "Returned result: 0" 10 PASS bar(i >= 100) is "Returned result: 0" 11 PASS bar(i >= 100) is "Returned result: 0" 12 PASS bar(i >= 100) is "Returned result: 0" 13 PASS bar(i >= 100) is "Returned result: 0" 14 PASS bar(i >= 100) is "Returned result: 0" 15 PASS bar(i >= 100) is "Returned result: 0" 16 PASS bar(i >= 100) is "Returned result: 0" 17 PASS bar(i >= 100) is "Returned result: 0" 18 PASS bar(i >= 100) is "Returned result: 0" 19 PASS bar(i >= 100) is "Returned result: 0" 20 PASS bar(i >= 100) is "Returned result: 0" 21 PASS bar(i >= 100) is "Returned result: 0" 22 PASS bar(i >= 100) is "Returned result: 0" 23 PASS bar(i >= 100) is "Returned result: 0" 24 PASS bar(i >= 100) is "Returned result: 0" 25 PASS bar(i >= 100) is "Returned result: 0" 26 PASS bar(i >= 100) is "Returned result: 0" 27 PASS bar(i >= 100) is "Returned result: 0" 28 PASS bar(i >= 100) is "Returned result: 0" 29 PASS bar(i >= 100) is "Returned result: 0" 30 PASS bar(i >= 100) is "Returned result: 0" 31 PASS bar(i >= 100) is "Returned result: 0" 32 PASS bar(i >= 100) is "Returned result: 0" 33 PASS bar(i >= 100) is "Returned result: 0" 34 PASS bar(i >= 100) is "Returned result: 0" 35 PASS bar(i >= 100) is "Returned result: 0" 36 PASS bar(i >= 100) is "Returned result: 0" 37 PASS bar(i >= 100) is "Returned result: 0" 38 PASS bar(i >= 100) is "Returned result: 0" 39 PASS bar(i >= 100) is "Returned result: 0" 40 PASS bar(i >= 100) is "Returned result: 0" 41 PASS bar(i >= 100) is "Returned result: 0" 42 PASS bar(i >= 100) is "Returned result: 0" 43 PASS bar(i >= 100) is "Returned result: 0" 44 PASS bar(i >= 100) is "Returned result: 0" 45 PASS bar(i >= 100) is "Returned result: 0" 46 PASS bar(i >= 100) is "Returned result: 0" 47 PASS bar(i >= 100) is "Returned result: 0" 48 PASS bar(i >= 100) is "Returned result: 0" 49 PASS bar(i >= 100) is "Returned result: 0" 50 PASS bar(i >= 100) is "Returned result: 0" 51 PASS bar(i >= 100) is "Returned result: 0" 52 PASS bar(i >= 100) is "Returned result: 0" 53 PASS bar(i >= 100) is "Returned result: 0" 54 PASS bar(i >= 100) is "Returned result: 0" 55 PASS bar(i >= 100) is "Returned result: 0" 56 PASS bar(i >= 100) is "Returned result: 0" 57 PASS bar(i >= 100) is "Returned result: 0" 58 PASS bar(i >= 100) is "Returned result: 0" 59 PASS bar(i >= 100) is "Returned result: 0" 60 PASS bar(i >= 100) is "Returned result: 0" 61 PASS bar(i >= 100) is "Returned result: 0" 62 PASS bar(i >= 100) is "Returned result: 0" 63 PASS bar(i >= 100) is "Returned result: 0" 64 PASS bar(i >= 100) is "Returned result: 0" 65 PASS bar(i >= 100) is "Returned result: 0" 66 PASS bar(i >= 100) is "Returned result: 0" 67 PASS bar(i >= 100) is "Returned result: 0" 68 PASS bar(i >= 100) is "Returned result: 0" 69 PASS bar(i >= 100) is "Returned result: 0" 70 PASS bar(i >= 100) is "Returned result: 0" 71 PASS bar(i >= 100) is "Returned result: 0" 72 PASS bar(i >= 100) is "Returned result: 0" 73 PASS bar(i >= 100) is "Returned result: 0" 74 PASS bar(i >= 100) is "Returned result: 0" 75 PASS bar(i >= 100) is "Returned result: 0" 76 PASS bar(i >= 100) is "Returned result: 0" 77 PASS bar(i >= 100) is "Returned result: 0" 78 PASS bar(i >= 100) is "Returned result: 0" 79 PASS bar(i >= 100) is "Returned result: 0" 80 PASS bar(i >= 100) is "Returned result: 0" 81 PASS bar(i >= 100) is "Returned result: 0" 82 PASS bar(i >= 100) is "Returned result: 0" 83 PASS bar(i >= 100) is "Returned result: 0" 84 PASS bar(i >= 100) is "Returned result: 0" 85 PASS bar(i >= 100) is "Returned result: 0" 86 PASS bar(i >= 100) is "Returned result: 0" 87 PASS bar(i >= 100) is "Returned result: 0" 88 PASS bar(i >= 100) is "Returned result: 0" 89 PASS bar(i >= 100) is "Returned result: 0" 90 PASS bar(i >= 100) is "Returned result: 0" 91 PASS bar(i >= 100) is "Returned result: 0" 92 PASS bar(i >= 100) is "Returned result: 0" 93 PASS bar(i >= 100) is "Returned result: 0" 94 PASS bar(i >= 100) is "Returned result: 0" 95 PASS bar(i >= 100) is "Returned result: 0" 96 PASS bar(i >= 100) is "Returned result: 0" 97 PASS bar(i >= 100) is "Returned result: 0" 98 PASS bar(i >= 100) is "Returned result: 0" 99 PASS bar(i >= 100) is "Returned result: 0" 100 PASS bar(i >= 100) is "Returned result: 0" 101 PASS bar(i >= 100) is "Returned result: 0" 102 PASS bar(i >= 100) is "Returned result: 0" 103 PASS bar(i >= 100) is "Returned result: 0" 104 PASS bar(i >= 100) is "Returned result: 0" 105 PASS bar(i >= 100) is "Returned result: 0" 106 106 PASS bar(i >= 100) is "Threw exception: Error: InvalidStateError: DOM Exception 11" 107 107 PASS bar(i >= 100) is "Threw exception: Error: InvalidStateError: DOM Exception 11" -
trunk/LayoutTests/js/dom/script-tests/dfg-custom-getter-throw-inlined.js
r161051 r161058 4 4 5 5 function foo(x) { 6 return x. responseText;6 return x.status; 7 7 } 8 8 … … 11 11 } 12 12 13 function bar( binary) {13 function bar(doOpen) { 14 14 var x = new XMLHttpRequest(); 15 x.open("GET", "http://foo.bar.com/"); 16 if (binary) 17 x.responseType = "arraybuffer"; 15 if (doOpen) 16 x.open("GET", "http://foo.bar.com/"); 18 17 try { 19 18 return "Returned result: " + baz(x); … … 27 26 28 27 for (var i = 0; i < 200; i = dfgIncrement({f:baz, i:i + 1, n:50})) { 29 shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: Error: InvalidStateError: DOM Exception 11\"" : "\"Returned result: \"");28 shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: Error: InvalidStateError: DOM Exception 11\"" : "\"Returned result: 0\""); 30 29 } 31 30 -
trunk/LayoutTests/js/dom/script-tests/dfg-custom-getter-throw.js
r161051 r161058 4 4 5 5 function foo(x) { 6 return x. responseText;6 return x.status; 7 7 } 8 8 9 function bar( binary) {9 function bar(doOpen) { 10 10 var x = new XMLHttpRequest(); 11 x.open("GET", "http://foo.bar.com/"); 12 if (binary) 13 x.responseType = "arraybuffer"; 11 if (doOpen) 12 x.open("GET", "http://foo.bar.com/"); 14 13 try { 15 14 return "Returned result: " + foo(x); … … 20 19 21 20 for (var i = 0; i < 200; ++i) { 22 shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: Error: InvalidStateError: DOM Exception 11\"" : "\"Returned result: \"");21 shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: Error: InvalidStateError: DOM Exception 11\"" : "\"Returned result: 0\""); 23 22 } 24 23 -
trunk/Source/WebCore/ChangeLog
r161054 r161058 1 2013-12-24 Ryosuke Niwa <rniwa@webkit.org> 2 3 Unreviewed, rolling out r161051. 4 http://trac.webkit.org/changeset/161051 5 https://bugs.webkit.org/show_bug.cgi?id=45994 6 7 Caused two DFG tests to hit assertions due to a separate bug 8 9 * xml/XMLHttpRequest.cpp: 10 (WebCore::XMLHttpRequest::status): 11 (WebCore::XMLHttpRequest::statusText): 12 * xml/XMLHttpRequest.h: 13 * xml/XMLHttpRequest.idl: 14 1 15 2013-12-24 Mihnea Ovidenie <mihnea@adobe.com> 2 16 -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r161051 r161058 1090 1090 } 1091 1091 1092 int XMLHttpRequest::status() const 1093 { 1094 if (m_state == UNSENT || m_state == OPENED || m_error) 1095 return 0; 1096 1092 int XMLHttpRequest::status(ExceptionCode& ec) const 1093 { 1097 1094 if (m_response.httpStatusCode()) 1098 1095 return m_response.httpStatusCode(); 1099 1096 1097 if (m_state == OPENED) { 1098 // Firefox only raises an exception in this state; we match it. 1099 // Note the case of local file requests, where we have no HTTP response code! Firefox never raises an exception for those, but we match HTTP case for consistency. 1100 ec = INVALID_STATE_ERR; 1101 } 1102 1100 1103 return 0; 1101 1104 } 1102 1105 1103 String XMLHttpRequest::statusText() const 1104 { 1105 if (m_state == UNSENT || m_state == OPENED || m_error) 1106 return String(); 1107 1106 String XMLHttpRequest::statusText(ExceptionCode& ec) const 1107 { 1108 1108 if (!m_response.httpStatusText().isNull()) 1109 1109 return m_response.httpStatusText(); 1110 1111 if (m_state == OPENED) { 1112 // See comments in status() above. 1113 ec = INVALID_STATE_ERR; 1114 } 1110 1115 1111 1116 return String(); -
trunk/Source/WebCore/xml/XMLHttpRequest.h
r161051 r161058 86 86 87 87 const URL& url() const { return m_url; } 88 String statusText( ) const;89 int status( ) const;88 String statusText(ExceptionCode&) const; 89 int status(ExceptionCode&) const; 90 90 State readyState() const; 91 91 bool withCredentials() const { return m_includeCredentials; } -
trunk/Source/WebCore/xml/XMLHttpRequest.idl
r161051 r161058 89 89 [GetterRaisesException, CachedAttribute, CustomGetter] readonly attribute Object response; 90 90 91 readonly attribute unsigned short status;92 readonly attribute DOMString statusText;91 [GetterRaisesException] readonly attribute unsigned short status; 92 [GetterRaisesException] readonly attribute DOMString statusText; 93 93 94 94 // Extension
Note: See TracChangeset
for help on using the changeset viewer.