// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PARTITION_ALLOC_DANGLING_RAW_PTR_CHECKS_H_ #define PARTITION_ALLOC_DANGLING_RAW_PTR_CHECKS_H_ #include <cstdint> #include "partition_alloc/partition_alloc_base/component_export.h" // When compiled with build flags `enable_dangling_raw_ptr_checks`, dangling // raw_ptr are reported. Its behavior can be configured here. // // Purpose of this level of indirection: // - Ease testing. // - Keep partition_alloc/ independent from base/. In most cases, when a // dangling raw_ptr is detected/released, this involves recording a // base::debug::StackTrace, which isn't desirable inside partition_alloc/. // - Be able (potentially) to turn this feature on/off at runtime based on // dependant's flags. partition_alloc // namespace partition_alloc #endif // PARTITION_ALLOC_DANGLING_RAW_PTR_CHECKS_H_