WebCore:
Reviewed by Anders Carlsson.
Fixed <rdar://problem/
5725429> REGRESSION (r27898): Greenfield online
surveys no longer work due to XMLHttpRequest exceptions
Reverted some exception throwing code from r12194.
To comply with the W3C draft spec, we used to throw an exception when
trying to access responseText and responseXML at the wrong time, but
that turned out to be a compatibility problem.
Now, matching Firefox and previous versions of WebKit, we never throw
an exception when accessing responseText or responseXML.
See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::getResponseText):
(WebCore::XMLHttpRequest::getResponseXML):
LayoutTests:
Reviewed by Anders Carlsson.
Fixed <rdar://problem/
5725429> REGRESSION (r27898): Greenfield online
surveys no longer work due to XMLHttpRequest exceptions
Updated layout tests to expect an exception not to be thrown.
* http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html:
* http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html:
* http/tests/xmlhttprequest/zero-length-response-expected.txt:
* http/tests/xmlhttprequest/zero-length-response-sync-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30328 268f45cc-cd09-0410-ab3c-d52691b4dbfc