Commit 75bb6b9e authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

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.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/18247004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c4b6e08a
......@@ -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;
......
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