From: yangguo@chromium.org Date: Tue, 4 Jun 2013 08:06:53 +0000 (+0000) Subject: Revert accidental change to SealHandleScope. X-Git-Tag: upstream/4.7.83~14026 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b10a3abdfe32fa4e6dbdbe2aa1450a61b6d82f6d;p=platform%2Fupstream%2Fv8.git Revert accidental change to SealHandleScope. R=dslomov@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/16226007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/handles-inl.h b/src/handles-inl.h index 8f001af..9d38f38 100644 --- a/src/handles-inl.h +++ b/src/handles-inl.h @@ -185,8 +185,8 @@ inline SealHandleScope::SealHandleScope(Isolate* isolate) : isolate_(isolate) { isolate_->handle_scope_data(); // Shrink the current handle scope to make it impossible to do // handle allocations without an explicit handle scope. + limit_ = current->limit; current->limit = current->next; - level_ = current->level; current->level = 0; } @@ -195,10 +195,12 @@ inline SealHandleScope::SealHandleScope(Isolate* isolate) : isolate_(isolate) { inline SealHandleScope::~SealHandleScope() { // Restore state in current handle scope to re-enable handle // allocations. - v8::ImplementationUtilities::HandleScopeData* data = + v8::ImplementationUtilities::HandleScopeData* current = isolate_->handle_scope_data(); - ASSERT_EQ(0, data->level); - data->level = level_; + ASSERT_EQ(0, current->level); + current->level = level_; + ASSERT_EQ(current->next, current->limit); + current->limit = limit_; } #endif diff --git a/src/handles.h b/src/handles.h index 46dd1fd..573298a 100644 --- a/src/handles.h +++ b/src/handles.h @@ -345,7 +345,6 @@ class SealHandleScope BASE_EMBEDDED { Isolate* isolate_; Object** limit_; int level_; - bool active_; #endif };