Reviewed by Darin.
Synchronous loads don't get added to our requestsByDocument dictionary, so we should try to remove the request in this case.
* khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::removeFromRequestsByDocument): added checks to make sure request exists before trying to remove it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9243
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-06-01 Adele Peterson <adele@apple.com>
+
+ fix for <rdar://problem/4135705> REGRESSION (412-TOT) crash in TV Tracker widget - KJS::XMLHttpRequest::removeFromRequestsByDocument()
+
+ Reviewed by Darin.
+
+ Synchronous loads don't get added to our requestsByDocument dictionary, so we should try to remove the request in this case.
+
+ * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::removeFromRequestsByDocument): added checks to make sure request exists before trying to remove it.
+
2005-05-30 Darin Adler <darin@apple.com>
Reviewed by John (fix for Radar bug) and Vicki (all the rest).
assert(doc);
QPtrDict<XMLHttpRequest> *requests = requestsByDocument().find(doc);
- assert(requests);
- assert(requests->find(this));
+ // Since synchronous loads are not added to requestsByDocument(), we need to make sure we found the request.
+ if (!requests || !requests->find(this))
+ return;
+
requests->remove(this);
if (requests->isEmpty()) {