Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Unified Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 23005006: Fix XMLHttpRequest leak document when send() is called multiple times. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-leaks-on-multiple-send-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index e65a4a720fdbfada888d91a162972db8b908dfab..3c4b59b40beeb76873f08d20678d0ae4b77afb04 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -761,7 +761,8 @@ void XMLHttpRequest::createRequest(ExceptionState& es)
// Neither this object nor the JavaScript wrapper should be deleted while
// a request is in progress because we need to keep the listeners alive,
// and they are referenced by the JavaScript wrapper.
- setPendingActivity(this);
+ if (!hasPendingActivity())
haraken 2013/08/14 01:30:59 I'm not sure if this is a right fix. If send() is
kouhei (in TOK) 2013/08/14 02:30:09 There should not be a pending activity at this poi
+ setPendingActivity(this);
}
} else {
request.setPriority(ResourceLoadPriorityVeryHigh);
@@ -778,9 +779,6 @@ void XMLHttpRequest::createRequest(ExceptionState& es)
void XMLHttpRequest::abort()
{
- // internalAbort() calls dropProtection(), which may release the last reference.
- RefPtr<XMLHttpRequest> protect(this);
-
bool sendFlag = m_loader;
internalAbort();
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-leaks-on-multiple-send-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698