%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
// Copyright 2021 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "include/cppgc/testing.h" #include "src/base/logging.h" #include "src/heap/cppgc/heap-base.h" namespace cppgc { namespace testing { OverrideEmbedderStackStateScope::OverrideEmbedderStackStateScope( HeapHandle& heap_handle, EmbedderStackState state) : heap_handle_(heap_handle) { auto& heap = internal::HeapBase::From(heap_handle_); CHECK_NULL(heap.override_stack_state_.get()); heap.override_stack_state_ = std::make_unique<EmbedderStackState>(state); } OverrideEmbedderStackStateScope::~OverrideEmbedderStackStateScope() { internal::HeapBase::From(heap_handle_).override_stack_state_.reset(); } StandaloneTestingHeap::StandaloneTestingHeap(HeapHandle& heap_handle) : heap_handle_(heap_handle) {} void StandaloneTestingHeap::StartGarbageCollection() { internal::HeapBase::From(heap_handle_) .StartIncrementalGarbageCollectionForTesting(); } bool StandaloneTestingHeap::PerformMarkingStep(EmbedderStackState stack_state) { return internal::HeapBase::From(heap_handle_) .marker() ->IncrementalMarkingStepForTesting(stack_state); } void StandaloneTestingHeap::FinalizeGarbageCollection( EmbedderStackState stack_state) { internal::HeapBase::From(heap_handle_) .FinalizeIncrementalGarbageCollectionForTesting(stack_state); } void StandaloneTestingHeap::ToggleMainThreadMarking(bool should_mark) { internal::HeapBase::From(heap_handle_) .marker() ->SetMainThreadMarkingDisabledForTesting(!should_mark); } void StandaloneTestingHeap::ForceCompactionForNextGarbageCollection() { internal::HeapBase::From(heap_handle_) .compactor() .EnableForNextGCForTesting(); } } // namespace testing } // namespace cppgc