Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 864bd493a3afd7980d4f79349d07264adbf1343f..fec3dc66ab4260b63b6e8a6023d34961e53536bc 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1960,6 +1960,15 @@ void Isolate::SetIsolateThreadLocals(Isolate* isolate, |
Isolate::~Isolate() { |
TRACE_ISOLATE(destructor); |
+ // The entry stack must be empty when we get here, |
+ // except for the default isolate, where it can |
+ // still contain up to one entry stack item |
+ ASSERT(entry_stack_ == NULL || this == default_isolate_); |
+ ASSERT(entry_stack_ == NULL || entry_stack_->previous_item == NULL); |
+ |
+ delete entry_stack_; |
+ entry_stack_ = NULL; |
+ |
delete[] assembler_spare_buffer_; |
assembler_spare_buffer_ = NULL; |