#include "partition_alloc/dangling_raw_ptr_checks.h"
#include "partition_alloc/partition_alloc_base/component_export.h"
#include "partition_alloc/partition_alloc_check.h"
namespace partition_alloc {
namespace {
DanglingRawPtrDetectedFn* g_dangling_raw_ptr_detected_fn = …;
DanglingRawPtrReleasedFn* g_dangling_raw_ptr_released_fn = …;
DanglingRawPtrDetectedFn* g_unretained_dangling_raw_ptr_detected_fn = …;
bool g_unretained_dangling_raw_ptr_check_enabled = …;
}
DanglingRawPtrDetectedFn* GetDanglingRawPtrDetectedFn() { … }
DanglingRawPtrDetectedFn* GetDanglingRawPtrReleasedFn() { … }
void SetDanglingRawPtrDetectedFn(DanglingRawPtrDetectedFn fn) { … }
void SetDanglingRawPtrReleasedFn(DanglingRawPtrReleasedFn fn) { … }
DanglingRawPtrDetectedFn* GetUnretainedDanglingRawPtrDetectedFn() { … }
void SetUnretainedDanglingRawPtrDetectedFn(DanglingRawPtrDetectedFn* fn) { … }
bool SetUnretainedDanglingRawPtrCheckEnabled(bool enabled) { … }
namespace internal {
PA_COMPONENT_EXPORT(PARTITION_ALLOC) void DanglingRawPtrDetected(uintptr_t id) { … }
PA_COMPONENT_EXPORT(PARTITION_ALLOC) void DanglingRawPtrReleased(uintptr_t id) { … }
PA_COMPONENT_EXPORT(PARTITION_ALLOC)
void UnretainedDanglingRawPtrDetected(uintptr_t id) { … }
PA_COMPONENT_EXPORT(PARTITION_ALLOC)
bool IsUnretainedDanglingRawPtrCheckEnabled() { … }
}
}