Commit 872accb4 authored by Hannes Payer's avatar Hannes Payer Committed by Commit Bot

[heap] Fix DCHECK in SetReadAndWritable to allow non-space MemoryChunks.

Bug: chromium:774108,v8:6792
Change-Id: I2bf361cab6da5e57302fb83d384b5f7e8e847c9a
Reviewed-on: https://chromium-review.googlesource.com/738145Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48972}
parent fdf6c2b1
......@@ -557,7 +557,10 @@ void MemoryChunk::SetReadAndExecutable() {
void MemoryChunk::SetReadAndWritable() {
DCHECK(IsFlagSet(MemoryChunk::IS_EXECUTABLE));
DCHECK(owner()->identity() == CODE_SPACE || owner()->identity() == LO_SPACE);
// TODO(hpayer): owner() can only be null if we use the MemoryChunk outside
// of spaces. We actually should not do that and we should untangle this.
DCHECK(owner() == nullptr || owner()->identity() == CODE_SPACE ||
owner()->identity() == LO_SPACE);
// Incrementing the write_unprotect_counter_ and changing the page
// protection mode has to be atomic.
base::LockGuard<base::Mutex> guard(page_protection_change_mutex_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment