WebCore: Fix for XMLHttpRequest.abort() should destroy the response text.
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2009 23:49:13 +0000 (23:49 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2009 23:49:13 +0000 (23:49 +0000)
commit4704ab46eb14cf3ff35e71cca1a9b0b2370a1d47
tree19a51c95d6b5c25add4a53f06d014fee2a3366e8
parent8b1308aa215f7341ca1c84f5a2c6a0265345870b
WebCore: Fix for XMLHttpRequest.abort() should destroy the response text.
https://bugs.webkit.org/show_bug.cgi?id=29658
<rdar://problem/5301430>

Reviewed by Alexey Proskuryakov.

Clearing the response text after calling XMLHttpRequest.abort() is necessary
per spec and matches Firefox. It is also a potential memory win.

Test: http/tests/xmlhttprequest/abort-should-destroy-responseText.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::abort): Clear the response text making sure to
keep the actual ResourceReponse around so that the response status and response
status text are kept around.

LayoutTests: Test for XMLHttpRequest.abort() should destroy the response text.
https://bugs.webkit.org/show_bug.cgi?id=29658
<rdar://problem/5301430>

Reviewed by Alexey Proskuryakov.

* http/tests/xmlhttprequest/abort-should-destroy-responseText-expected.txt: Added.
* http/tests/xmlhttprequest/abort-should-destroy-responseText.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/abort-should-destroy-responseText-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/abort-should-destroy-responseText.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/xml/XMLHttpRequest.cpp