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

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

Issue 23180002: Revert 156078 "Fix XMLHttpRequest leak document when send() is c..." (Closed) Base URL: svn://svn.chromium.org/blink/
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 | « trunk/Source/core/xml/XMLHttpRequest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/xml/XMLHttpRequest.cpp
===================================================================
--- trunk/Source/core/xml/XMLHttpRequest.cpp (revision 156081)
+++ trunk/Source/core/xml/XMLHttpRequest.cpp (working copy)
@@ -751,15 +751,11 @@
// This is true while running onunload handlers.
// FIXME: Maybe we need to be able to send XMLHttpRequests from onunload, <http://bugs.webkit.org/show_bug.cgi?id=10904>.
// FIXME: Maybe create() can return null for other reasons too?
- ASSERT(!m_loader);
m_loader = ThreadableLoader::create(scriptExecutionContext(), this, request, options);
if (m_loader) {
// 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.
-
- // m_loader was null, so there should be no pending activity at this point.
- ASSERT(!hasPendingActivity());
setPendingActivity(this);
}
} else {
@@ -805,7 +801,7 @@
}
}
-void XMLHttpRequest::internalAbort(DropProtection async)
+void XMLHttpRequest::internalAbort()
{
bool hadLoader = m_loader;
@@ -823,12 +819,8 @@
InspectorInstrumentation::didFailXHRLoading(scriptExecutionContext(), this);
- if (hadLoader) {
- if (async == DropProtectionAsync)
- dropProtectionSoon();
- else
- dropProtection();
- }
+ if (hadLoader)
+ dropProtectionSoon();
}
void XMLHttpRequest::clearResponse()
@@ -1230,7 +1222,7 @@
void XMLHttpRequest::stop()
{
- internalAbort(DropProtectionAsync);
+ internalAbort();
}
void XMLHttpRequest::contextDestroyed()
« no previous file with comments | « trunk/Source/core/xml/XMLHttpRequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698