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

Unified Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 1980893002: Remove OwnPtr::release() calls in core/ (part 4). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index 23687c66cd72f9cdc7ed7f221b6b4a1ee6af8d53..f4ceb9f4676b2106b4420c1d460b24d82d26a2f5 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -340,7 +340,7 @@ Blob* XMLHttpRequest::responseBlob()
blobData->setContentType(finalResponseMIMETypeWithFallback().lower());
m_binaryResponseBuilder.clear();
}
- m_responseBlob = Blob::create(BlobDataHandle::create(blobData.release(), size));
+ m_responseBlob = Blob::create(BlobDataHandle::create(std::move(blobData), size));
}
}
@@ -1026,7 +1026,7 @@ bool XMLHttpRequest::internalAbort()
// If, window.onload contains open() and send(), m_loader will be set to
// non 0 value. So, we cannot continue the outer open(). In such case,
// just abort the outer open() by returning false.
- OwnPtr<ThreadableLoader> loader = m_loader.release();
+ OwnPtr<ThreadableLoader> loader = std::move(m_loader);
loader->cancel();
// If abort() called internalAbort() and a nested open() ended up
@@ -1448,7 +1448,7 @@ PassRefPtr<BlobDataHandle> XMLHttpRequest::createBlobDataHandleFromResponse()
// finalResponseMIMEType() after compatibility investigation.
blobData->setContentType(finalResponseMIMETypeWithFallback().lower());
}
- return BlobDataHandle::create(blobData.release(), m_lengthDownloadedToFile);
+ return BlobDataHandle::create(std::move(blobData), m_lengthDownloadedToFile);
}
void XMLHttpRequest::notifyParserStopped()
@@ -1554,7 +1554,7 @@ PassOwnPtr<TextResourceDecoder> XMLHttpRequest::createDecoder() const
if (!m_finalResponseCharset.isEmpty()) {
OwnPtr<TextResourceDecoder> decoder(TextResourceDecoder::create("text/plain"));
decoder->setEncoding(WTF::TextEncoding(m_finalResponseCharset), TextResourceDecoder::EncodingFromHTTPHeader);
- return decoder.release();
+ return decoder;
}
// allow TextResourceDecoder to look inside the m_response if it's XML or HTML
@@ -1565,7 +1565,7 @@ PassOwnPtr<TextResourceDecoder> XMLHttpRequest::createDecoder() const
// versions, Firefox and Opera.
decoder->useLenientXMLDecoding();
- return decoder.release();
+ return decoder;
}
if (responseIsHTML())
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698