Revert accidental change to SealHandleScope.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 4 Jun 2013 08:06:53 +0000 (08:06 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 4 Jun 2013 08:06:53 +0000 (08:06 +0000)
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

src/handles-inl.h
src/handles.h

index 8f001af..9d38f38 100644 (file)
@@ -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
index 46dd1fd..573298a 100644 (file)
@@ -345,7 +345,6 @@ class SealHandleScope BASE_EMBEDDED {
   Isolate* isolate_;
   Object** limit_;
   int level_;
-  bool active_;
 #endif
 };