Index: src/core/SkFlattenableSerialization.cpp |
diff --git a/src/core/SkFlattenableSerialization.cpp b/src/core/SkFlattenableSerialization.cpp |
index 31602079a39b995897d906c8996b726a92478b42..e9ce09ff1f7f8d4b40b960c4f0435cc0cfe9e02f 100644 |
--- a/src/core/SkFlattenableSerialization.cpp |
+++ b/src/core/SkFlattenableSerialization.cpp |
@@ -15,9 +15,9 @@ SkData* SkValidatingSerializeFlattenable(SkFlattenable* flattenable) { |
SkWriteBuffer writer(SkWriteBuffer::kValidation_Flag); |
writer.writeFlattenable(flattenable); |
size_t size = writer.bytesWritten(); |
- SkData* data = SkData::NewUninitialized(size); |
+ auto data = SkData::MakeUninitialized(size); |
writer.writeToMemory(data->writable_data()); |
- return data; |
+ return data.release(); |
} |
SkFlattenable* SkValidatingDeserializeFlattenable(const void* data, size_t size, |