https://bugs.webkit.org/show_bug.cgi?id=90483
Reviewed by Abhishek Arya.
No new tests, covered by http/tests/xmlhttprequest/reentrant-cancel.html
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::cancel):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121803
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-07-03 Nate Chapin <japhet@chromium.org>
+
+ Protect this DocumentThreadableLoader in cancel() to handle reentrancy properly.
+ https://bugs.webkit.org/show_bug.cgi?id=90483
+
+ Reviewed by Abhishek Arya.
+
+ No new tests, covered by http/tests/xmlhttprequest/reentrant-cancel.html
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::cancel):
+
2012-07-03 Tony Chang <tony@chromium.org>
[chromium] Unreviewed, update .gitignore to handle VS2010 files.
void DocumentThreadableLoader::cancel()
{
- // Cacnel can re-enter and m_resource might be null here as a result.
+ RefPtr<DocumentThreadableLoader> protect(this);
+
+ // Cancel can re-enter and m_resource might be null here as a result.
if (m_client && m_resource) {
ResourceError error(errorDomainWebKitInternal, 0, m_resource->url(), "Load cancelled");
error.setIsCancellation(true);