Index: src/sfnt/SkOTUtils.cpp |
diff --git a/src/sfnt/SkOTUtils.cpp b/src/sfnt/SkOTUtils.cpp |
index 52d996fbc59c469e33e647f8c49bc483270e768a..683d750bda52a4cbef5c5f98781985cb91ca2fde 100644 |
--- a/src/sfnt/SkOTUtils.cpp |
+++ b/src/sfnt/SkOTUtils.cpp |
@@ -83,7 +83,7 @@ SkData* SkOTUtils::RenameFont(SkStreamAsset* fontData, const char* fontName, int |
size_t originalDataSize = fontData->getLength() - oldNameTablePhysicalSize; |
size_t newDataSize = originalDataSize + nameTablePhysicalSize; |
- SkAutoTUnref<SkData> rewrittenFontData(SkData::NewUninitialized(newDataSize)); |
+ auto rewrittenFontData = SkData::MakeUninitialized(newDataSize); |
SK_OT_BYTE* data = static_cast<SK_OT_BYTE*>(rewrittenFontData->writable_data()); |
if (fontData->read(data, oldNameTableOffset) < oldNameTableOffset) { |
@@ -157,7 +157,7 @@ SkData* SkOTUtils::RenameFont(SkStreamAsset* fontData, const char* fontName, int |
} |
} |
- return rewrittenFontData.detach(); |
+ return rewrittenFontData.release(); |
} |