Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 508c80bc91b139d5610628d72357bb1b0fd3e703..4f3947fb3879531c7d31014bd596729d340033f5 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -734,17 +734,17 @@ |
i::HandleScopeData* current = internal_isolate->handle_scope_data(); |
prev_limit_ = current->limit; |
current->limit = current->next; |
- prev_sealed_level_ = current->sealed_level; |
- current->sealed_level = current->level; |
+ prev_level_ = current->level; |
+ current->level = 0; |
} |
SealHandleScope::~SealHandleScope() { |
i::HandleScopeData* current = isolate_->handle_scope_data(); |
+ DCHECK_EQ(0, current->level); |
+ current->level = prev_level_; |
DCHECK_EQ(current->next, current->limit); |
current->limit = prev_limit_; |
- DCHECK_EQ(current->level, current->sealed_level); |
- current->sealed_level = prev_sealed_level_; |
} |