Fix three ~Isolate() related memory leaks

BUG=93253
TEST=running valgrind on cctest/test-api/RunTwoIsolatesOnSingleThread reports fewer leaks than before

Review URL: http://codereview.chromium.org/7624043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4c460099
......@@ -406,6 +406,10 @@ class HandleScopeImplementer {
spare_(NULL),
call_depth_(0) { }
~HandleScopeImplementer() {
DeleteArray(spare_);
}
// Threading support for handle data.
static int ArchiveSpacePerThread();
char* RestoreThread(char* from);
......
......@@ -1335,6 +1335,7 @@ void Isolate::ThreadDataTable::Remove(PerIsolateThreadData* data) {
if (list_ == data) list_ = data->next_;
if (data->next_ != NULL) data->next_->prev_ = data->prev_;
if (data->prev_ != NULL) data->prev_->next_ = data->next_;
delete data;
}
......@@ -1536,6 +1537,9 @@ Isolate::~Isolate() {
// Has to be called while counters_ are still alive.
zone_.DeleteKeptSegment();
delete[] assembler_spare_buffer_;
assembler_spare_buffer_ = NULL;
delete unicode_cache_;
unicode_cache_ = NULL;
......
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