| Index: src/handles-inl.h
|
| diff --git a/src/handles-inl.h b/src/handles-inl.h
|
| index 5b879d8f088e2491669095c628586299f8781f20..185280887ad14b5c52cd2712b7c9c2e39f03f45d 100644
|
| --- a/src/handles-inl.h
|
| +++ b/src/handles-inl.h
|
| @@ -130,16 +130,17 @@ void HandleScope::CloseScope(Isolate* isolate,
|
| v8::ImplementationUtilities::HandleScopeData* current =
|
| isolate->handle_scope_data();
|
|
|
| - current->next = prev_next;
|
| + std::swap(current->next, prev_next);
|
| current->level--;
|
| if (current->limit != prev_limit) {
|
| current->limit = prev_limit;
|
| DeleteExtensions(isolate);
|
| - }
|
| -
|
| #ifdef ENABLE_EXTRA_CHECKS
|
| - ZapRange(prev_next, prev_limit);
|
| + ZapRange(current->next, prev_limit);
|
| + } else {
|
| + ZapRange(current->next, prev_next);
|
| #endif
|
| + }
|
| }
|
|
|
|
|
|
|