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

Unified Diff: src/ports/SkFontConfigParser_android.h

Issue 226183002: Prevent potential leaking of memory by using SkString and SkTArray. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « src/ports/SkFontConfigInterface_android.cpp ('k') | src/ports/SkFontConfigParser_android.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontConfigParser_android.h
diff --git a/src/ports/SkFontConfigParser_android.h b/src/ports/SkFontConfigParser_android.h
index fd64496f774fe1f9f0851a2fa10f3b0dd5918064..e2247efb0ab42d0524b8a683d348f464b269f9f2 100644
--- a/src/ports/SkFontConfigParser_android.h
+++ b/src/ports/SkFontConfigParser_android.h
@@ -15,9 +15,7 @@
#include "SkTDArray.h"
struct FontFileInfo {
- FontFileInfo() : fFileName(NULL) {}
-
- const char* fFileName;
+ SkString fFileName;
SkPaintOptionsAndroid fPaintOptions;
};
@@ -32,8 +30,8 @@ struct FontFileInfo {
struct FontFamily {
FontFamily() : fIsFallbackFont(false), order(-1) {}
- SkTDArray<const char*> fNames;
- SkTDArray<FontFileInfo*> fFontFiles;
+ SkTArray<SkString> fNames;
+ SkTArray<FontFileInfo> fFontFiles;
bool fIsFallbackFont;
int order; // only used internally by SkFontConfigParser
};
« no previous file with comments | « src/ports/SkFontConfigInterface_android.cpp ('k') | src/ports/SkFontConfigParser_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698