Index: src/api.h |
diff --git a/src/api.h b/src/api.h |
index 12d6e3d08229343644b3f571933c15543b90c19b..62380ce651249d86548c37679c9b2deb248c1bfd 100644 |
--- a/src/api.h |
+++ b/src/api.h |
@@ -637,7 +637,12 @@ void HandleScopeImplementer::DeleteExtensions(internal::Object** prev_limit) { |
internal::Object** block_limit = block_start + kHandleBlockSize; |
#ifdef DEBUG |
// NoHandleAllocation may make the prev_limit to point inside the block. |
- if (block_start <= prev_limit && prev_limit <= block_limit) break; |
+ if (block_start <= prev_limit && prev_limit <= block_limit) { |
+#ifdef ENABLE_EXTRA_CHECKS |
+ internal::HandleScope::ZapRange(prev_limit, block_limit); |
+#endif |
+ break; |
+ } |
#else |
if (prev_limit == block_limit) break; |
#endif |