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

Unified Diff: third_party/WebKit/Source/core/fileapi/Blob.cpp

Issue 1983753002: Remove OwnPtr::release() calls in core/ (part 2). (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
Index: third_party/WebKit/Source/core/fileapi/Blob.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/Blob.cpp b/third_party/WebKit/Source/core/fileapi/Blob.cpp
index e3731074d67de2948070fdd2207c1ece475cd9e6..22143b9137b17d7c58121b59c41a82a5091f06b5 100644
--- a/third_party/WebKit/Source/core/fileapi/Blob.cpp
+++ b/third_party/WebKit/Source/core/fileapi/Blob.cpp
@@ -105,7 +105,7 @@ Blob* Blob::create(ExecutionContext* context, const HeapVector<ArrayBufferOrArra
populateBlobData(blobData.get(), blobParts, normalizeLineEndingsToNative);
long long blobSize = blobData->length();
- return new Blob(BlobDataHandle::create(blobData.release(), blobSize));
+ return new Blob(BlobDataHandle::create(std::move(blobData), blobSize));
}
Blob* Blob::create(const unsigned char* data, size_t bytes, const String& contentType)
@@ -117,7 +117,7 @@ Blob* Blob::create(const unsigned char* data, size_t bytes, const String& conten
blobData->appendBytes(data, bytes);
long long blobSize = blobData->length();
- return new Blob(BlobDataHandle::create(blobData.release(), blobSize));
+ return new Blob(BlobDataHandle::create(std::move(blobData), blobSize));
}
// static
@@ -180,7 +180,7 @@ Blob* Blob::slice(long long start, long long end, const String& contentType, Exc
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(contentType);
blobData->appendBlob(m_blobDataHandle, start, length);
- return Blob::create(BlobDataHandle::create(blobData.release(), length));
+ return Blob::create(BlobDataHandle::create(std::move(blobData), length));
}
void Blob::close(ExecutionContext* executionContext, ExceptionState& exceptionState)
@@ -201,7 +201,7 @@ void Blob::close(ExecutionContext* executionContext, ExceptionState& exceptionSt
// (e.g., XHR.send()) consider them as empty.
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(type());
- m_blobDataHandle = BlobDataHandle::create(blobData.release(), 0);
+ m_blobDataHandle = BlobDataHandle::create(std::move(blobData), 0);
m_isClosed = true;
}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceLoader.cpp ('k') | third_party/WebKit/Source/core/fileapi/File.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698