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

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

Issue 166903010: Oilpan: Move core/xml/ to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index 2f37743af7b7c6457d7dec5ba94da9b1e29d8adb..736559a880f4b47ecd889e2ef6e2124844411531 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -60,6 +60,8 @@
namespace WebCore {
+DEFINE_GC_INFO(XMLHttpRequest);
+
DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, xmlHttpRequestCounter, ("XMLHttpRequest"));
// Histogram enum to see when we can deprecate xhr.send(ArrayBuffer).
@@ -153,9 +155,9 @@ static void logConsoleError(ExecutionContext* context, const String& message)
context->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message);
}
-PassRefPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext* context, PassRefPtr<SecurityOrigin> securityOrigin)
+PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext* context, PassRefPtr<SecurityOrigin> securityOrigin)
{
- RefPtr<XMLHttpRequest> xmlHttpRequest(adoptRef(new XMLHttpRequest(context, securityOrigin)));
+ RefPtrWillBeRawPtr<XMLHttpRequest> xmlHttpRequest = adoptRefCountedWillBeRefCountedGarbageCollected(new XMLHttpRequest(context, securityOrigin));
xmlHttpRequest->suspendIfNeeded();
return xmlHttpRequest.release();
@@ -870,7 +872,7 @@ void XMLHttpRequest::abort()
WTF_LOG(Network, "XMLHttpRequest %p abort()", this);
// internalAbort() calls dropProtection(), which may release the last reference.
- RefPtr<XMLHttpRequest> protect(this);
+ RefPtrWillBeRawPtr<XMLHttpRequest> protect(this);
bool sendFlag = m_loader;
@@ -1264,7 +1266,7 @@ void XMLHttpRequest::didFinishLoading(unsigned long identifier, double)
InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this, identifier, m_responseText, m_method, m_url, m_lastSendURL, m_lastSendLineNumber);
// Prevent dropProtection releasing the last reference, and retain |this| until the end of this method.
- RefPtr<XMLHttpRequest> protect(this);
+ RefPtrWillBeRawPtr<XMLHttpRequest> protect(this);
if (m_loader) {
m_loader = 0;
@@ -1383,7 +1385,7 @@ void XMLHttpRequest::handleDidTimeout()
WTF_LOG(Network, "XMLHttpRequest %p handleDidTimeout()", this);
// internalAbort() calls dropProtection(), which may release the last reference.
- RefPtr<XMLHttpRequest> protect(this);
+ RefPtrWillBeRawPtr<XMLHttpRequest> protect(this);
// Response is cleared next, save needed progress event data.
long long expectedLength = m_response.expectedContentLength();

Powered by Google App Engine
This is Rietveld 408576698