Revision: 10751
Author: [email protected]
Date: Mon Feb 20 03:01:17 2012
Log: 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
Review URL: https://chromiumcodereview.appspot.com/9395073
http://code.google.com/p/v8/source/detail?r=10751
Modified:
/branches/bleeding_edge/src/api.cc
=======================================
--- /branches/bleeding_edge/src/api.cc Wed Feb 8 04:49:04 2012
+++ /branches/bleeding_edge/src/api.cc Mon Feb 20 03:01:17 2012
@@ -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 @@
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