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

Unified Diff: testing/embedder_test.cpp

Issue 2068563002: Fix memory leaks with V8 startup data. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: 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 | « samples/pdfium_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/embedder_test.cpp
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index 59190a7751de2cca2e9b9f19294688cb0248e0a1..ec05dd421e1b01669ac93325d0bc36eafcb74d6e 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -62,6 +62,11 @@ EmbedderTest::~EmbedderTest() {
#ifdef PDF_ENABLE_V8
v8::V8::ShutdownPlatform();
delete platform_;
+
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+ free(const_cast<char*>(natives_.data));
Lei Zhang 2016/06/20 18:57:07 Not sure why I didn't notice the bot failure earli
+ free(const_cast<char*>(snapshot_.data));
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
#endif // PDF_ENABLE_V8
}
« no previous file with comments | « samples/pdfium_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698