%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/heap-consistency.h" #include "include/cppgc/heap.h" #include "src/base/logging.h" #include "src/heap/cppgc/heap-base.h" namespace cppgc { namespace subtle { // static bool DisallowGarbageCollectionScope::IsGarbageCollectionAllowed( cppgc::HeapHandle& heap_handle) { auto& heap_base = internal::HeapBase::From(heap_handle); return !heap_base.in_disallow_gc_scope(); } // static void DisallowGarbageCollectionScope::Enter(cppgc::HeapHandle& heap_handle) { auto& heap_base = internal::HeapBase::From(heap_handle); heap_base.disallow_gc_scope_++; } // static void DisallowGarbageCollectionScope::Leave(cppgc::HeapHandle& heap_handle) { auto& heap_base = internal::HeapBase::From(heap_handle); DCHECK_GT(heap_base.disallow_gc_scope_, 0); heap_base.disallow_gc_scope_--; } DisallowGarbageCollectionScope::DisallowGarbageCollectionScope( cppgc::HeapHandle& heap_handle) : heap_handle_(heap_handle) { Enter(heap_handle); } DisallowGarbageCollectionScope::~DisallowGarbageCollectionScope() { Leave(heap_handle_); } // static void NoGarbageCollectionScope::Enter(cppgc::HeapHandle& heap_handle) { auto& heap_base = internal::HeapBase::From(heap_handle); heap_base.no_gc_scope_++; } // static void NoGarbageCollectionScope::Leave(cppgc::HeapHandle& heap_handle) { auto& heap_base = internal::HeapBase::From(heap_handle); DCHECK_GT(heap_base.no_gc_scope_, 0); heap_base.no_gc_scope_--; } NoGarbageCollectionScope::NoGarbageCollectionScope( cppgc::HeapHandle& heap_handle) : heap_handle_(heap_handle) { Enter(heap_handle); } NoGarbageCollectionScope::~NoGarbageCollectionScope() { Leave(heap_handle_); } } // namespace subtle } // namespace cppgc