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