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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 2493603003: Destroy library before deleting g_font_info in ShutdownSDK() (Closed)
Patch Set: Remove bad delete Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 52ff4e69d684db4198d551d37f8c543e55a7b92c..535a7715b622ab852abc140cf2f1ebac858ca17b 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -320,8 +320,9 @@ struct FPDF_SYSFONTINFO_WITHMETRICS : public FPDF_SYSFONTINFO {
default_sysfontinfo = sysfontinfo;
}
Tom Sepez 2016/11/10 17:47:08 Probably cleaner to call FPDF_FreeDefaultSystemFon
- ~FPDF_SYSFONTINFO_WITHMETRICS() { delete default_sysfontinfo; }
+ ~FPDF_SYSFONTINFO_WITHMETRICS() {}
+ // Not owned.
Tom Sepez 2016/11/10 17:47:08 nit: in which case this comment goes away.
FPDF_SYSFONTINFO* default_sysfontinfo;
};
@@ -651,11 +652,11 @@ bool InitializeSDK() {
}
void ShutdownSDK() {
+ FPDF_DestroyLibrary();
#if !defined(OS_LINUX)
FPDF_FreeDefaultSystemFontInfo(g_font_info->default_sysfontinfo);
delete g_font_info;
#endif
- FPDF_DestroyLibrary();
TearDownV8();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698