Reviewers: Dmitry Lomov (chromium),

Description:
Revert accidental change to SealHandleScope.

[email protected]
BUG=

Please review this at https://chromiumcodereview.appspot.com/16226007/

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

Affected files:
  M src/handles-inl.h


Index: src/handles-inl.h
diff --git a/src/handles-inl.h b/src/handles-inl.h
index 8f001afc01119660eb223a4b0851928924e9214f..9d38f3891034695322c14b0d132b73f2db1eff8e 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


--
--
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