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

Unified Diff: third_party/WebKit/Source/platform/wtf/typed_arrays/TypedArrayBase.h

Issue 2909613002: Replaced usage of RefPtr::Release with std::move wraps. (Closed)
Patch Set: Created 3 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/platform/wtf/typed_arrays/TypedArrayBase.h
diff --git a/third_party/WebKit/Source/platform/wtf/typed_arrays/TypedArrayBase.h b/third_party/WebKit/Source/platform/wtf/typed_arrays/TypedArrayBase.h
index 34465c57716a70ac683c3e3bf543a3b2830a2090..e95c196589f55774686bd62c6be1db43bda8f643 100644
--- a/third_party/WebKit/Source/platform/wtf/typed_arrays/TypedArrayBase.h
+++ b/third_party/WebKit/Source/platform/wtf/typed_arrays/TypedArrayBase.h
@@ -71,7 +71,7 @@ class TypedArrayBase : public ArrayBufferView {
template <class Subclass>
static PassRefPtr<Subclass> Create(unsigned length) {
RefPtr<ArrayBuffer> buffer = ArrayBuffer::Create(length, sizeof(T));
- return Create<Subclass>(buffer.Release(), 0, length);
+ return Create<Subclass>(std::move(buffer), 0, length);
}
template <class Subclass>
@@ -89,7 +89,7 @@ class TypedArrayBase : public ArrayBufferView {
unsigned length) {
RefPtr<ArrayBuffer> buf(std::move(buffer));
CHECK(VerifySubRange<T>(buf, byte_offset, length));
- return AdoptRef(new Subclass(buf.Release(), byte_offset, length));
+ return AdoptRef(new Subclass(std::move(buf), byte_offset, length));
}
template <class Subclass>
@@ -97,7 +97,7 @@ class TypedArrayBase : public ArrayBufferView {
RefPtr<ArrayBuffer> buffer = ArrayBuffer::CreateOrNull(length, sizeof(T));
if (!buffer)
return nullptr;
- return Create<Subclass>(buffer.Release(), 0, length);
+ return Create<Subclass>(std::move(buffer), 0, length);
}
void Neuter() final {
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/text/WTFString.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698