Pass new flags to cppgc heap initialization. Ensure the marking phase is only run when PDFium is not actively mutating memory. REQUIRES V8 Roll past d46c94d before landing. Bug: chromium:1156170 Change-Id: If401c0f0ac3cf5a1fa010a892b9bc6de1e7dd025 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76910 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Hui Yingst <nigi@chromium.org>
diff --git a/fxjs/gc/heap.cpp b/fxjs/gc/heap.cpp index 2c02752..45e3df7 100644 --- a/fxjs/gc/heap.cpp +++ b/fxjs/gc/heap.cpp
@@ -73,8 +73,14 @@ ++g_platform_ref_count; auto heap = cppgc::Heap::Create( std::make_shared<CFXGC_Platform>(), - {{}, cppgc::Heap::StackSupport::kNoConservativeStackScan, {}}); - + cppgc::Heap::HeapOptions{ + {}, + cppgc::Heap::StackSupport::kNoConservativeStackScan, + cppgc::Heap::MarkingType::kAtomic, + // TODO(tsepez): switch to incremental sweeping when the issue + // in https://crbug.com/1156170 is resolved. + cppgc::Heap::SweepingType::kAtomic, + {}}); return FXGCScopedHeap(heap.release()); }