[heap] Increase scope of CodeSpaceMemoryModificationScope to incorporate all code space writes.

Bug: chromium:774108,v8:6792
Change-Id: I7a458991921b5241c11db8999be433f4b33ce639
Reviewed-on: https://chromium-review.googlesource.com/738144
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48970}
This commit is contained in:
Hannes Payer 2017-10-26 14:38:51 +02:00 committed by Commit Bot
parent 868b1b7446
commit bfd4df0344
2 changed files with 2 additions and 1 deletions

View File

@ -1651,6 +1651,8 @@ void Heap::MarkCompact() {
uint64_t size_of_objects_before_gc = SizeOfObjects();
CodeSpaceMemoryModificationScope code_modifcation(this);
mark_compact_collector()->Prepare();
ms_count_++;

View File

@ -3754,7 +3754,6 @@ void MarkCompactCollector::Sweeper::AddSweptPageSafe(PagedSpace* space,
void MarkCompactCollector::Evacuate() {
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE);
base::LockGuard<base::Mutex> guard(heap()->relocation_mutex());
CodeSpaceMemoryModificationScope code_modifcation(heap());
{
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE_PROLOGUE);