[handles] Do not zap new blocks for local handles

Not needed in order to prevent use-after-frees.

Bug: v8:10315
Change-Id: I7713b2fb39681bb88e60fc7cc417b40430f0c73c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2326031
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69175}
This commit is contained in:
Dominik Inführ 2020-07-29 15:10:18 +02:00 committed by Commit Bot
parent c7d22c4991
commit c60e772c30

View File

@ -54,9 +54,6 @@ bool LocalHandles::Contains(Address* location) {
Address* LocalHandles::AddBlock() { Address* LocalHandles::AddBlock() {
DCHECK_EQ(scope_.next, scope_.limit); DCHECK_EQ(scope_.next, scope_.limit);
Address* block = NewArray<Address>(kHandleBlockSize); Address* block = NewArray<Address>(kHandleBlockSize);
#ifdef ENABLE_HANDLE_ZAPPING
ZapRange(block, block + kHandleBlockSize);
#endif
blocks_.push_back(block); blocks_.push_back(block);
scope_.next = block; scope_.next = block;
scope_.limit = block + kHandleBlockSize; scope_.limit = block + kHandleBlockSize;