Commit ba06ceac authored by Hannes Payer's avatar Hannes Payer Committed by Commit Bot

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

Bug: chromium:774108,v8:6792
Change-Id: Ia312b8c6ca8608f8ac96e8caefd061900b40079b
Reviewed-on: https://chromium-review.googlesource.com/739481Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48976}
parent 7dd261c3
...@@ -609,7 +609,10 @@ CodePageMemoryModificationScope::CodePageMemoryModificationScope( ...@@ -609,7 +609,10 @@ CodePageMemoryModificationScope::CodePageMemoryModificationScope(
scope_active_(FLAG_write_protect_code_memory && scope_active_(FLAG_write_protect_code_memory &&
chunk_->IsFlagSet(MemoryChunk::IS_EXECUTABLE)) { chunk_->IsFlagSet(MemoryChunk::IS_EXECUTABLE)) {
if (scope_active_) { if (scope_active_) {
DCHECK(chunk_->owner()->identity() == CODE_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(chunk_->owner() == nullptr ||
chunk_->owner()->identity() == CODE_SPACE ||
(chunk_->owner()->identity() == LO_SPACE && (chunk_->owner()->identity() == LO_SPACE &&
chunk_->IsFlagSet(MemoryChunk::IS_EXECUTABLE))); chunk_->IsFlagSet(MemoryChunk::IS_EXECUTABLE)));
chunk_->SetReadAndWritable(); chunk_->SetReadAndWritable();
......
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