Patch for crash in XMLHttpRequest
David Faure
faure at kde.org
Wed Nov 17 02:20:26 CET 2004
--- xmlhttprequest.cpp~ 2004-06-29 06:44:23.000000000 +0200
+++ xmlhttprequest.cpp 2004-11-17 02:19:29.234709152 +0100
@@ -503,8 +503,8 @@ void XMLHttpRequest::slotFinished(KIO::J
response += decoder->flush();
}
- changeState(Completed);
job = 0;
+ changeState(Completed);
if (decoder) {
decoder->deref();
This is necessary because changeState might call some JS code which
might call abort, so job (which will be soon deleted) needs to be 0
*before* calling that JS code.
Testcase: http://pookey.keme.net/~pookey/adsl/test.php
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the Khtml-devel
mailing list