Reviewers: Jakob, danno,

Description:
Cleanup the default Isolate's entry stack.

This adds an ASSERT that the entry_stack_ of the Isolate is
empty upon destruction. The default Isolate is an exception
here, as it may still contain an entry stack item upon
destruction.

Please review this at https://codereview.chromium.org/18247004/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/isolate.cc


Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 864bd493a3afd7980d4f79349d07264adbf1343f..89f7922d97b087ce453cf4c1d93182f6d018d511 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1960,6 +1960,14 @@ void Isolate::SetIsolateThreadLocals(Isolate* isolate,
 Isolate::~Isolate() {
   TRACE_ISOLATE(destructor);

+  // Cleanup entry stack for default isolate
+  ASSERT(entry_stack_ == NULL || this == default_isolate_);
+  ASSERT(entry_stack_ == NULL || entry_stack_->previous_item == NULL);
+  if (entry_stack_ != NULL) {
+    delete entry_stack_;
+    entry_stack_ = NULL;
+  }
+
   delete[] assembler_spare_buffer_;
   assembler_spare_buffer_ = NULL;



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to