1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/sequence_checker.h"
11 #include "base/check.h"
12 #include "base/debug/stack_trace.h"
18 ScopedValidateSequenceChecker::ScopedValidateSequenceChecker(
19 const SequenceChecker& checker) {
20 std::unique_ptr<debug::StackTrace> bound_at;
21 DCHECK(checker.CalledOnValidSequence(&bound_at))
22 << (bound_at ? "\nWas attached to sequence at:\n" + bound_at->ToString()
26 ScopedValidateSequenceChecker::~ScopedValidateSequenceChecker() = default;
27 #endif // DCHECK_IS_ON()