Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: src/isolate.cc

Issue 18247004: Cleanup the default Isolate's entry stack. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
Jakob Kummerow 2013/07/02 07:15:02 You don't need this condition; "delete" is safe to
+ delete entry_stack_;
+ entry_stack_ = NULL;
+ }
+
delete[] assembler_spare_buffer_;
assembler_spare_buffer_ = NULL;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698