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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3f8ed7c3
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment