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

Unified Diff: samples/pdfium_test.cc

Issue 2068563002: Fix memory leaks with V8 startup data. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix non-V8 builds Created 4 years, 6 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 | « no previous file | testing/embedder_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/pdfium_test.cc
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 7651205738d03033657f4efcc3fb695ce56eeb36..f244d8a44056976c31e4c9e4b0e1ddc1447a2da4 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -882,6 +882,11 @@ int main(int argc, const char* argv[]) {
#ifdef PDF_ENABLE_V8
v8::V8::ShutdownPlatform();
delete platform;
+
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+ free(const_cast<char*>(natives.data));
+ free(const_cast<char*>(snapshot.data));
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
#endif // PDF_ENABLE_V8
return 0;
« no previous file with comments | « no previous file | testing/embedder_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698