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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp

Issue 2807073002: Removed local RefPtr objects created from PassRefPtr arguments. (Closed)
Patch Set: addressed review Created 3 years, 8 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/image-decoders/ImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
index cd45b1bad19e6a16ddb24c30babdd91c65327415..0372d6dba411a8857e4a74b59a499b7533f884ec 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
@@ -68,12 +68,10 @@ inline bool MatchesBMPSignature(const char* contents) {
static constexpr size_t kLongestSignatureLength = sizeof("RIFF????WEBPVP") - 1;
std::unique_ptr<ImageDecoder> ImageDecoder::Create(
- PassRefPtr<SegmentReader> pass_data,
+ RefPtr<SegmentReader> data,
bool data_complete,
AlphaOption alpha_option,
const ColorBehavior& color_behavior) {
- RefPtr<SegmentReader> data = pass_data;
-
// We need at least kLongestSignatureLength bytes to run the signature
// matcher.
if (data->size() < kLongestSignatureLength)
@@ -122,7 +120,7 @@ std::unique_ptr<ImageDecoder> ImageDecoder::Create(
}
if (decoder)
- decoder->SetData(data.Release(), data_complete);
+ decoder->SetData(std::move(data), data_complete);
return decoder;
}

Powered by Google App Engine
This is Rietveld 408576698