[Network/SSL] Make |ScopedChapsLoadFixup| STACK_ALLOCATED()
- Annotate |ScopedChapsLoadFixup| with STACK_ALLOCATED(); - Exclude |ScopedChapsLoadFixup::chaps_handle_| from raw pointer usage check. I missed this field during the automatic rewrite crrev.com/c/4607774 . Adding the exclusion annotation to make compilation success with |is_component_build = true|. Context: Change-Id: I425d34938b0cea68f3fdc23bc799791f97ff851f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4625702 Reviewed-by: Keishi Hattori <keishi@chromium.org> Reviewed-by: Adam Langley <agl@chromium.org> Commit-Queue: Mikihito Matsuura <mikt@google.com> Cr-Commit-Position: refs/heads/main@{#1159607}
This commit is contained in:
@@ -9,6 +9,8 @@
|
|||||||
#include <secmodt.h>
|
#include <secmodt.h>
|
||||||
|
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
|
#include "base/memory/raw_ptr_exclusion.h"
|
||||||
|
#include "base/memory/stack_allocated.h"
|
||||||
#include "base/threading/scoped_blocking_call.h"
|
#include "base/threading/scoped_blocking_call.h"
|
||||||
#include "crypto/scoped_nss_types.h"
|
#include "crypto/scoped_nss_types.h"
|
||||||
#include "nss_util_internal.h"
|
#include "nss_util_internal.h"
|
||||||
@@ -22,13 +24,18 @@ const char kChapsModuleName[] = "Chaps";
|
|||||||
const char kChapsPath[] = "libchaps.so";
|
const char kChapsPath[] = "libchaps.so";
|
||||||
|
|
||||||
class ScopedChapsLoadFixup {
|
class ScopedChapsLoadFixup {
|
||||||
|
STACK_ALLOCATED();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ScopedChapsLoadFixup();
|
ScopedChapsLoadFixup();
|
||||||
~ScopedChapsLoadFixup();
|
~ScopedChapsLoadFixup();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if defined(COMPONENT_BUILD)
|
#if defined(COMPONENT_BUILD)
|
||||||
void* chaps_handle_;
|
// This field stores a handle and is not a pointer to PA memory.
|
||||||
|
// Also, this class is always stack-allocated and visibility is limited.
|
||||||
|
// Hence no benefit from using raw_ptr<void>.
|
||||||
|
RAW_PTR_EXCLUSION void* chaps_handle_;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user