Reviewers: Mikhail Naganov (Chromium),
Message:
Please take a look.
Description:
Fix memory leak and missing #include in StartupDataDecompressor
BUG=v8:1960
TEST=compile with GYPFLAGS=-Dv8_compress_snapshot_data=bz2, then run d8 with
valgrind
Please review this at https://chromiumcodereview.appspot.com/9395073/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/api.cc
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index
2f8f1d15da74d63fce23f7a2f9d99c0e320b0da9..67fded8eb0940016c8a994e8ea0de46e98a813ed
100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -42,6 +42,9 @@
#include "global-handles.h"
#include "heap-profiler.h"
#include "messages.h"
+#ifdef COMPRESS_STARTUP_DATA_BZ2
+#include "natives.h"
+#endif
#include "parser.h"
#include "platform.h"
#include "profile-generator-inl.h"
@@ -357,6 +360,7 @@ int StartupDataDecompressor::Decompress() {
compressed_data[i].data = decompressed;
}
V8::SetDecompressedStartupData(compressed_data);
+ i::DeleteArray(compressed_data);
return 0;
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev