Diff
Modified: trunk/LayoutTests/ChangeLog (161057 => 161058)
--- trunk/LayoutTests/ChangeLog 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/LayoutTests/ChangeLog 2013-12-24 20:43:03 UTC (rev 161058)
@@ -1,3 +1,23 @@
+2013-12-24 Ryosuke Niwa <[email protected]>
+
+ Unreviewed, rolling out r161051.
+ http://trac.webkit.org/changeset/161051
+ https://bugs.webkit.org/show_bug.cgi?id=45994
+
+ Caused two DFG tests to hit assertions due to a separate bug
+
+ * http/tests/xmlhttprequest/exceptions-expected.txt:
+ * http/tests/xmlhttprequest/exceptions.html:
+ * http/tests/xmlhttprequest/status-after-abort-expected.txt:
+ * http/tests/xmlhttprequest/zero-length-response-expected.txt:
+ * js/dom/dfg-custom-getter-throw-expected.txt:
+ * js/dom/script-tests/dfg-custom-getter-throw-inlined.js:
+ (foo):
+ (bar):
+ * js/dom/script-tests/dfg-custom-getter-throw.js:
+ (foo):
+ (bar):
+
2013-12-24 Radu Stavila <[email protected]>
Rename fast/regions/repaint/increasing-region-content-height.html to something more clear
Modified: trunk/LayoutTests/http/tests/xmlhttprequest/exceptions-expected.txt (161057 => 161058)
--- trunk/LayoutTests/http/tests/xmlhttprequest/exceptions-expected.txt 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/exceptions-expected.txt 2013-12-24 20:43:03 UTC (rev 161058)
@@ -6,6 +6,8 @@
open()
PASS: req.setRequestHeader() threw exception TypeError: Not enough arguments.
PASS: req.setRequestHeader("Foo") threw exception TypeError: Not enough arguments.
+PASS: req.status() threw exception Error: InvalidStateError: DOM Exception 11.
+PASS: req.statusText() threw exception Error: InvalidStateError: DOM Exception 11.
send()
PASS: req.send(null) threw exception Error: InvalidStateError: DOM Exception 11.
PASS: req.setRequestHeader("Foo", "bar") threw exception Error: InvalidStateError: DOM Exception 11.
Modified: trunk/LayoutTests/http/tests/xmlhttprequest/exceptions.html (161057 => 161058)
--- trunk/LayoutTests/http/tests/xmlhttprequest/exceptions.html 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/exceptions.html 2013-12-24 20:43:03 UTC (rev 161058)
@@ -64,6 +64,8 @@
shouldThrow('req.setRequestHeader()');
shouldThrow('req.setRequestHeader("Foo")');
+ shouldThrow('req.status()');
+ shouldThrow('req.statusText()');
req.send(null);
log("send()");
Modified: trunk/LayoutTests/http/tests/xmlhttprequest/status-after-abort-expected.txt (161057 => 161058)
--- trunk/LayoutTests/http/tests/xmlhttprequest/status-after-abort-expected.txt 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/status-after-abort-expected.txt 2013-12-24 20:43:03 UTC (rev 161058)
@@ -2,15 +2,15 @@
A newly created request. Response status: 0; statusText: ''; readyState: 0
Opening...
-Onreadystatechange. Response status: 0; statusText: ''; readyState: 1
-Opened request. Response status: 0; statusText: ''; readyState: 1
-Sent request. Response status: 0; statusText: ''; readyState: 1
+Onreadystatechange. Response status: [exception]; statusText: '[exception]'; readyState: 1
+Opened request. Response status: [exception]; statusText: '[exception]'; readyState: 1
+Sent request. Response status: [exception]; statusText: '[exception]'; readyState: 1
Onreadystatechange. Response status: 200; statusText: 'OK'; readyState: 2
Onreadystatechange. Response status: 200; statusText: 'OK'; readyState: 3
Onreadystatechange. Response status: 200; statusText: 'OK'; readyState: 4
Aborting the request...
-After aborting the request. Response status: 0; statusText: ''; readyState: 0
+After aborting the request. Response status: 200; statusText: 'OK'; readyState: 0
Reopening the request to check that the status is reset...
-Onreadystatechange. Response status: 0; statusText: ''; readyState: 1
+Onreadystatechange. Response status: [exception]; statusText: '[exception]'; readyState: 1
Done.
Modified: trunk/LayoutTests/http/tests/xmlhttprequest/zero-length-response-expected.txt (161057 => 161058)
--- trunk/LayoutTests/http/tests/xmlhttprequest/zero-length-response-expected.txt 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/zero-length-response-expected.txt 2013-12-24 20:43:03 UTC (rev 161058)
@@ -8,14 +8,14 @@
ResponseXML serialized: n/a
after setting onreadystatechange: Uninitialized
onreadystatechange: Open
- Status: 0
- StatusText: ""
+ Exception getting status: InvalidStateError: DOM Exception 11
+ Exception getting StatusText: InvalidStateError: DOM Exception 11
ResponseText: ""
ResponseXML: null
ResponseXML serialized: n/a
after open(): Open
- Status: 0
- StatusText: ""
+ Exception getting status: InvalidStateError: DOM Exception 11
+ Exception getting StatusText: InvalidStateError: DOM Exception 11
ResponseText: ""
ResponseXML: null
ResponseXML serialized: n/a
Modified: trunk/LayoutTests/js/dom/dfg-custom-getter-throw-expected.txt (161057 => 161058)
--- trunk/LayoutTests/js/dom/dfg-custom-getter-throw-expected.txt 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/LayoutTests/js/dom/dfg-custom-getter-throw-expected.txt 2013-12-24 20:43:03 UTC (rev 161058)
@@ -3,106 +3,106 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
-PASS bar(i >= 100) is "Returned result: "
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
+PASS bar(i >= 100) is "Returned result: 0"
PASS bar(i >= 100) is "Threw exception: Error: InvalidStateError: DOM Exception 11"
PASS bar(i >= 100) is "Threw exception: Error: InvalidStateError: DOM Exception 11"
PASS bar(i >= 100) is "Threw exception: Error: InvalidStateError: DOM Exception 11"
Modified: trunk/LayoutTests/js/dom/script-tests/dfg-custom-getter-throw-inlined.js (161057 => 161058)
--- trunk/LayoutTests/js/dom/script-tests/dfg-custom-getter-throw-inlined.js 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/LayoutTests/js/dom/script-tests/dfg-custom-getter-throw-inlined.js 2013-12-24 20:43:03 UTC (rev 161058)
@@ -3,18 +3,17 @@
);
function foo(x) {
- return x.responseText;
+ return x.status;
}
function baz(x) {
return foo(x);
}
-function bar(binary) {
+function bar(doOpen) {
var x = new XMLHttpRequest();
- x.open("GET", "http://foo.bar.com/");
- if (binary)
- x.responseType = "arraybuffer";
+ if (doOpen)
+ x.open("GET", "http://foo.bar.com/");
try {
return "Returned result: " + baz(x);
} catch (e) {
@@ -26,7 +25,7 @@
silentTestPass = true;
for (var i = 0; i < 200; i = dfgIncrement({f:baz, i:i + 1, n:50})) {
- shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: Error: InvalidStateError: DOM Exception 11\"" : "\"Returned result: \"");
+ shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: Error: InvalidStateError: DOM Exception 11\"" : "\"Returned result: 0\"");
}
Modified: trunk/LayoutTests/js/dom/script-tests/dfg-custom-getter-throw.js (161057 => 161058)
--- trunk/LayoutTests/js/dom/script-tests/dfg-custom-getter-throw.js 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/LayoutTests/js/dom/script-tests/dfg-custom-getter-throw.js 2013-12-24 20:43:03 UTC (rev 161058)
@@ -3,14 +3,13 @@
);
function foo(x) {
- return x.responseText;
+ return x.status;
}
-function bar(binary) {
+function bar(doOpen) {
var x = new XMLHttpRequest();
- x.open("GET", "http://foo.bar.com/");
- if (binary)
- x.responseType = "arraybuffer";
+ if (doOpen)
+ x.open("GET", "http://foo.bar.com/");
try {
return "Returned result: " + foo(x);
} catch (e) {
@@ -19,7 +18,7 @@
}
for (var i = 0; i < 200; ++i) {
- shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: Error: InvalidStateError: DOM Exception 11\"" : "\"Returned result: \"");
+ shouldBe("bar(i >= 100)", i >= 100 ? "\"Threw exception: Error: InvalidStateError: DOM Exception 11\"" : "\"Returned result: 0\"");
}
Modified: trunk/Source/WebCore/ChangeLog (161057 => 161058)
--- trunk/Source/WebCore/ChangeLog 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/Source/WebCore/ChangeLog 2013-12-24 20:43:03 UTC (rev 161058)
@@ -1,3 +1,17 @@
+2013-12-24 Ryosuke Niwa <[email protected]>
+
+ Unreviewed, rolling out r161051.
+ http://trac.webkit.org/changeset/161051
+ https://bugs.webkit.org/show_bug.cgi?id=45994
+
+ Caused two DFG tests to hit assertions due to a separate bug
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::status):
+ (WebCore::XMLHttpRequest::statusText):
+ * xml/XMLHttpRequest.h:
+ * xml/XMLHttpRequest.idl:
+
2013-12-24 Mihnea Ovidenie <[email protected]>
[CSSRegions] Crash while repainting an invalid region
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (161057 => 161058)
--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2013-12-24 20:43:03 UTC (rev 161058)
@@ -1089,25 +1089,30 @@
return DOMImplementation::isXMLMIMEType(responseMIMEType().lower());
}
-int XMLHttpRequest::status() const
+int XMLHttpRequest::status(ExceptionCode& ec) const
{
- if (m_state == UNSENT || m_state == OPENED || m_error)
- return 0;
-
if (m_response.httpStatusCode())
return m_response.httpStatusCode();
+ if (m_state == OPENED) {
+ // Firefox only raises an exception in this state; we match it.
+ // 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.
+ ec = INVALID_STATE_ERR;
+ }
+
return 0;
}
-String XMLHttpRequest::statusText() const
+String XMLHttpRequest::statusText(ExceptionCode& ec) const
{
- if (m_state == UNSENT || m_state == OPENED || m_error)
- return String();
-
if (!m_response.httpStatusText().isNull())
return m_response.httpStatusText();
+ if (m_state == OPENED) {
+ // See comments in status() above.
+ ec = INVALID_STATE_ERR;
+ }
+
return String();
}
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.h (161057 => 161058)
--- trunk/Source/WebCore/xml/XMLHttpRequest.h 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.h 2013-12-24 20:43:03 UTC (rev 161058)
@@ -85,8 +85,8 @@
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE { return ActiveDOMObject::scriptExecutionContext(); }
const URL& url() const { return m_url; }
- String statusText() const;
- int status() const;
+ String statusText(ExceptionCode&) const;
+ int status(ExceptionCode&) const;
State readyState() const;
bool withCredentials() const { return m_includeCredentials; }
void setWithCredentials(bool, ExceptionCode&);
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.idl (161057 => 161058)
--- trunk/Source/WebCore/xml/XMLHttpRequest.idl 2013-12-24 15:32:19 UTC (rev 161057)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.idl 2013-12-24 20:43:03 UTC (rev 161058)
@@ -88,8 +88,8 @@
[SetterRaisesException] attribute XMLHttpRequestResponseType responseType;
[GetterRaisesException, CachedAttribute, CustomGetter] readonly attribute Object response;
- readonly attribute unsigned short status;
- readonly attribute DOMString statusText;
+ [GetterRaisesException] readonly attribute unsigned short status;
+ [GetterRaisesException] readonly attribute DOMString statusText;
// Extension
void overrideMimeType(DOMString override);