1 2 // Copyright 2020 the V8 project authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 6 #include "src/heap/cppgc/marking-worklists.h" 7 8 namespace cppgc { 9 namespace internal { 10 11 constexpr int MarkingWorklists::kMutatorThreadId; 12 ClearForTesting()13void MarkingWorklists::ClearForTesting() { 14 marking_worklist_.Clear(); 15 not_fully_constructed_worklist_.Clear(); 16 previously_not_fully_constructed_worklist_.Clear(); 17 write_barrier_worklist_.Clear(); 18 weak_callback_worklist_.Clear(); 19 concurrent_marking_bailout_worklist_.Clear(); 20 discovered_ephemeron_pairs_worklist_.Clear(); 21 ephemeron_pairs_for_processing_worklist_.Clear(); 22 retrace_marked_objects_worklist_.Clear(); 23 } 24 ~ExternalMarkingWorklist()25MarkingWorklists::ExternalMarkingWorklist::~ExternalMarkingWorklist() { 26 DCHECK(IsEmpty()); 27 } 28 29 } // namespace internal 30 } // namespace cppgc 31